View source: R/format_POSIXct.R
format_posixct | R Documentation |
See title.
format_posixct(x, lang = "en", date = TRUE, time = TRUE)
x |
The POSIXct timestamp or a string to be automatically converted to a POSIXct timestamp. |
lang |
(Optional, String, Default = "en") The language of the result. Currently implemented: "en"/"de". If you supply another not yet implemented language here, "en" will be chosen automatically. |
date |
(Optional, Boolean, Default = TRUE) Should the date be part of the result string? |
time |
(Optional, Boolean, Default = TRUE) Should the time be part of the result string? |
(String) The formatted timestamp as a string.
## Not run:
format_POSIXct(x = "2021-12-31 12:34")
## Result: "2021-12-31, 12:34:00"
format_POSIXct(x = "2021-12-31 12:34", lang = "de")
## Result: "31.12.2021, 12:34:00"
format_posixct(Sys.time())
## Result: "2022-01-01, 09:10:50"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.