Looking at the last command, and it output, what do you mean by user's last command? It shows user, connection, day, date, time, and possibly if still connected.
A script could be written to extract from this file, but do not understand what you are trying to find. Can you supply more info and perhaps a sample of what you are trying to create?
A command like:
last | tr -s " " | cut -d" " -f1,5 | sort -u
would show users and months they had access/activity in.