parse_dates | R Documentation |
Parse dates
parse_dates(
x,
convert_excel = TRUE,
orders = c("Ymd", "dmY", "dmy", "mdY", "Ymd HMS")
)
x |
A character or numeric vector of dates |
convert_excel |
Logical indicating whether to convert Excel-encoded date values (e.g. "42370") into dates, using janitor::excel_numeric_to_date |
orders |
a character vector of date-time formats. Each order string is
a series of formatting characters as listed in |
A vector of class "Date". Values that cannot be converted to valid dates will
be returned as <NA>
.
x <- c("44087", "12//02/2019", "2020_05_14", "2021-01-30 14:00:04")
parse_dates(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.