0

I use as.POSIXct() to convert character to time stamp. It works well on my data frame except one entry:

as.POSIXct("03/29/2015-02:49:13", format = "%m/%d/%Y-%H:%M:%S")

This returns NA. I tried it with strptime() as follows:

strptime("03/29/2015-02:49:13", format = "%m/%d/%Y-%H:%M:%S")

It works but return a date of format POSIXlt. I used as.POSIXct() to transform this result but then it still returns NA.

Anyone has an idea how comes it behaves like this?

Vincent
  • 87
  • 1
  • 7
  • 1
    It works for me, yielding `2015-03-29 02:49:13 EET`. Maybe you have some issue with time zones or locale? – m0nhawk Jan 05 '16 at 13:34
  • Works fine for me as well: as.POSIXct("03/29/2015-02:49:13", format = "%m/%d/%Y-%H:%M:%S") [1] "2015-03-29 02:49:13 EDT" – Gopala Jan 05 '16 at 13:36
  • 2
    transition to daylight saving time (DST) ... https://www.timeanddate.com/time/dst/2015.html – rcs Jan 05 '16 at 13:37

0 Answers0