Converting numeric time to datetime POSIXct format in R

前端 未结 1 1575
耶瑟儿~
耶瑟儿~ 2020-12-06 21:46

I have a data frame containing what should be a datetime column that has been read into R. The time values are appearing as numeric time as seen in the below data example. I

1条回答
  •  死守一世寂寞
    2020-12-06 22:14

    Try one of these depending on which time zone you want:

    t.gmt <- as.POSIXct(3600 * (tdat - 974424), origin = '2011-03-01', tz = "GMT") 
    
    t.local <- as.POSIXct(format(t.gmt))
    

    0 讨论(0)
提交回复
热议问题