Hey I'm working on SparkR and I have this dataset with data field as this
2013-11-01 00:00
Result from str
Time : chr "2013-11-01 00:00" "2013-11-01 00:10" "2013-11-01 00:20" "2013-11-01 00:30" ...
Now I need to convert this data to milliseconds. Note: I need the Hour and minute.
When I tried a simple as.numeric
it gives me NA.
How can I do?
Ps:I searched similar questions and when I tried some solutions hour and minute disappear also when I user format
attribute.
I Did this now I need the inverse procedure from "2013-11-01 09:10" to ->1383293400000
a<-TrentoTo$TimeInterval[1] #1383293400000
b<-as.POSIXct((a)/1000, origin = "1970-01-01")
b<-strftime(b, format="%Y-%m-%d %H:%M") #"2013-11-01 09:10"