What's new

Convert time and Date to 24hs

Fever

Active member
Staff member
I have one dataset that has a column with 200k rows and every row presents different timestamps. Example:

02/20/2019 01:30:00 PM
15/02/2019 13:30:00


I have tried to use in R Studio:

dataset <-as.POSIXlt(dataset,format= "%m/%d/%Y %H:%M")

dataset <-as.POSIXlt(dataset,format= "%H:%M:%S")

dataset <-as.POSIXlt(dataset,format= "%m/%d/%Y %I:%M:%S")


But the value changed for "01:30:00" what is considered "AM" or sometimes it brings "NA" as a result.

Do you know if there is another way?

Continue reading...
 
Top