-2

JAN-15" to a POSIxct

as.POSIXct(c("5-JAN-15"),tz="GMT")

I am getting this error

Error in as.POSIXlt.character(x, tz = tz) : 
  character string is not in a standard unambiguous format
user3022875
  • 8,598
  • 26
  • 103
  • 167

1 Answers1

1

The format must be specified.

as.POSIXct("5-JAN-15", format="%d-%h-%y", tz="GMT")
#[1] "2015-01-05 GMT"
Pierre L
  • 28,203
  • 6
  • 47
  • 69