date_fun | R Documentation |
Date function to convert character/other as.POSIXct to date.
date_fun(x, tz = "EST", form = "%F")
x |
as.POSIXct or as.character |
tz |
timezone (default set to Eastern Standard Time) |
form |
format (default set to YYYY-mm-dd) |
Helper function to format date (and date-time) fields
datetime=as.character(c("2015-05-01 08:00:00","2015-10-15 12:00:00","2015-10-15 5:00:00"))
date.fun(datetime);# just date
date.fun(datetime, form="%F %X"); #include date and time
date.fun("2020-05-01")
date.fun(as.Date("2020-05-01"))
date.fun(as.POSIXct("2020-05-01 12:00:00",tz="EST"),form="%F %H:%M:%S")
date.fun(as.POSIXct("2020-05-01 12:00:00",tz="UTC"),form="%F %H:%M:%S")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.