Skip to content
Prev 248814 / 398503 Next

Extract time only from POSIXlt object

On Jan 29, 2011, at 7:45 PM, Simon Goodman wrote:

            
> ptime <- as.POSIXlt("2010-10-18 21:46:53")
 > ptime
[1] "2010-10-18 21:46:53"
 > format(ptime, format="%H:%M:%S")
[1] "21:46:53"

This is a character value, no longer a time.