| parse_date_chr | R Documentation |
Recognises ISO yyyy-mm-dd (with optional time), yyyy.mm.dd.,
yyyy/mm/dd, dd.mm.yyyy and, when allow_serial = TRUE, Excel date
serials (numbers between 3000 and 73000, i.e. 1908 to 2099).
parse_date_chr(x, allow_serial = FALSE)
x |
Character vector. |
allow_serial |
Logical; treat plausible numbers as Excel serials. |
Numeric vector of days since 1970-01-01, NA if not a date.
x <- c("2020-01-15", "16.01.2020", "2020/01/17", "43848", NA)
days <- parse_date_chr(x)
as.Date(days, origin = "1970-01-01")
days <- parse_date_chr(x, allow_serial = TRUE)
as.Date(days, origin = "1970-01-01")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.