data difference in `as.POSIXct` with Excel

后端 未结 4 918
眼角桃花
眼角桃花 2020-12-10 16:32

My actual data looks like:

8/8/2013 15:10
7/26/2013 10:30
7/11/2013 14:20
3/28/2013 16:15
3/18/2013 15:50

When I read this from the excel f

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-10 17:00

    Maybe it is a matter of how R reads the data. Just an example here with lubridate seems to work well.

    x <- "8/8/2013 15:10"
    library(lubridate)
    dmy_hm(x, tz = "GMT")
    [1] "2013-08-08 15:10:00 GMT"
    

提交回复
热议问题