format_utc {Nmisc} | R Documentation |
Format Date and POSIXct
Description
Converts Date and POSIXct objects to the format given as input.
Usage
format_utc(x, format = NULL, usetz = TRUE)
Arguments
x |
A Date or POSIXct object to be converted. |
format |
A character string. The default format is "%Y-%m-%d" for Date and "%Y-%m-%d %H:%M:%S" for POSIXct. |
usetz |
Logical. If TRUE, the time zone abbreviation is appended to the output. Applicable only if an POSIXct object. |
Value
A character string representing the formatted date.
See Also
Examples
format_utc(Sys.time(), format = "%Y-%m-%d", usetz = FALSE)
[Package Nmisc version 0.3.7 Index]