Hi,
It is because the print method for POSIXct likely tries to simplify. To see it
in the format you desire, you need to be explicit when calling it.
x = as.POSIXct('2018-11-2700:00:00', format = "%Y-%m-%d%H:%M:%S", tz = 'UTC')
format(x, "%Y-%m-%d %H:%M:%S %Z")
[1] "2018-11-27 00:00:00 UTC"
Ch
Hi,
I am trying to format my Character strings to POSIXct as below :
> as.POSIXct('2018-11-2700:00:00', format = "%Y-%m-%d%H:%M:%S", tz = 'UTC')
[1] "2018-11-27 UTC"
> as.POSIXct('2018-11-2701:00:00', format = "%Y-%m-%d%H:%M:%S", tz = 'UTC')
[1] "2018-11-27 01:00:00 UTC"
For the first case, I wa
2 matches
Mail list logo