Skip to content
Prev 9143 / 398502 Next

Get current time in numeric form?

dmurdoch at pair.com (Duncan Murdoch) writes:
Just to complete the discussion on date parsing,

unclass(as.POSIXct(strptime(date(),"%c"))) 

or

as.POSIXct(strptime(date(),"%c")) - structure(0,class="POSIXct")

gives the time in seconds since the beginning of time() (generally Jan
1 1970 0:00:00 GMT on Unixen).

However, I think proc.time()[3] is more relevant for your needs.