I work with the date format YYYY-mm-ddTHH: MM: SS.000Z (2014-02-05T08: 45: 01.326Z) or have a T separator that separates the date from time and the Z time indicator or Zulu time (UTC). I am trying to save timestamp as a POSIXct class using the following function:
timestamp <- as.POSIXct(strptime(as.character(data$Time), tz = "UTC", "%Y-%m-%d %H:%M:%S"))
I'm currently getting NA. If anyone has any recommendations on how I can incorporate the “T” and “Z” indicators into my conversion, I will be very grateful.
source
share