format_ISO8601 | R Documentation |
Format in ISO8601 character format
format_ISO8601(x, usetz = FALSE, precision = NULL, ...)
x |
An object to convert to ISO8601 character format. |
usetz |
Include the time zone in the formatting. If
|
precision |
The amount of precision to represent with
substrings of "ymdhms", as year, month, day, hour,
minute, and second. (e.g. "ymd" is days precision, "ymdhm" is minute precision.
When |
... |
Additional arguments to methods. |
A character vector of ISO8601-formatted text.
https://en.wikipedia.org/wiki/ISO_8601
format_ISO8601(as.Date("02-01-2018", format = "%m-%d-%Y"))
format_ISO8601(as.POSIXct("2018-02-01 03:04:05", tz = "America/New_York"), usetz = TRUE)
format_ISO8601(as.POSIXct("2018-02-01 03:04:05", tz = "America/New_York"), precision = "ymdhm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.