convert_to_date {bulkreadr} | R Documentation |
User friendly date parsing function
Description
convert_to_date()
parses an input vector into POSIXct date object. It is also powerful to convert from excel date number like 42370
into date value like 2016-01-01
.
Usage
convert_to_date(date_num_char, tz = "UTC")
Arguments
date_num_char |
A character or numeric vector of dates |
tz |
Time zone indicator. If |
Value
a vector of class Date
Examples
## ** heterogeneous dates **
dates <- c(
44869, "22.09.2022", NA, "02/27/92", "01-19-2022",
"13-01- 2022", "2023", "2023-2", 41750.2, 41751.99,
"11 07 2023", "2023-4"
)
convert_to_date(dates)
[Package bulkreadr version 1.1.1 Index]