str_extract_date | R Documentation |
Extract date from string
str_extract_date(x, format = "%Y-%m-%d")
str_extract_datetime(x, format = "%Y-%m-%d %H%M%S")
x |
A character vector |
format |
A date format to find |
A Date
(if found) or NA
str_extract_date("This is a file name 2020-02-21.csv")
str_extract_date(c("This is a file name 2020-02-21.csv",
"Date of 2012-06-15 here"))
str_extract_date(c("This is a file name 2020-02-21.csv", "No date"))
str_extract_date("Last saved 17 December 2019", format = "%d %B %Y")
str_extract_datetime(c("2020-02-21 235033", "2012-12-12 121212"))
str_extract_datetime("This is a file name 2020-02-21 235033.csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.