Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

convert datetime from string r

#Return "2021-01-20 20:11:59" in yyyy-mm-dd hh:mm:ss format.
ymd_hms("2021-01-20 20:11:59")

#> [1] "2021-01-20 20:11:59 UTC"

#Return "01/20/2021 08:01" in yyyy-mm-dd hh:mm format.
mdy_hm("01/20/2021 08:01")

#> [1] "2021-01-20 08:01:00 UTC"
 
PREVIOUS NEXT
Tagged: #convert #datetime #string
ADD COMMENT
Topic
Name
8+1 =