I made this using ticks instead of ctime and I also added a $replace to the $duration to make the output look better. I had the script make sure the item exists in the hash table before echoing so that it wont echo if its the first connection and the data doesnt exist yet.
I also have it check if the hash table exists and if not create it incase its the first connection.

Hope this helps.
Code:
On *:Connect:{
  if ($hget(LastConnected,Connected)) { echo 4 -s You last opened mirc $replace($duration($calc(($ticks - $hget(LastConnected,Connected)) / 1000)),min,$chr(32) $+ minute,sec,$chr(32) $+ second,hour,$chr(32) $+ hour,day,$chr(32) $+ day,week,$chr(32) $+ week,month,$chr(32) $+ month,year,$chr(32) $+ year) ago. }
  if (!$hget(LastConnected)) { hmake LastConnected }  
  hadd LastConnected Connected $ticks
}


I've gone to look for myself. If I should return before I get back, please keep me here.