I have a vector of numeric values and need to convert these back into date and time.
dput(vector)
c(1547224631587, 1547224162579, 1547224161576, 1547224160582,
1547224159591, 1547224158590, 1547224157574, 1547224156571, 1547224155584,
1547224154572)
This is Unix time stamp converted into milliseconds. I have tried using POSIXlt
& POSIXct
but the year it comes up with is 2019. Do I need to get an idea of when the time is from?
I have tried as.Data(as.POSIXct(x/1e3,origin="1970-01-01")) but it gives out the day, month and year only which is correct but does not provide the time in hours:minutes:seconds.
Am I missing something or anyone know of a different way of getting the date as well as time using a different function?