I have a vector or POSIXct and when I do as.character()
on it, it returns numbers instead of the characters. I unfortunately cannot reproduce this with toy data but this is what is happening:
d = as.POSIXct(c( "2015-09-08 17:42:07.456 GMT","2015-09-08 17:42:19.778 GMT"))
class(d) ##this returns POSIXct
but as.character(d)
returns
"1441740168.0001", "1441740168.0001"
Why am I getting "1441740168.0001", "1441740168.0001"
instead of dates in character format?