ymd(...)
Users should choose the function that models the order in which year(y), month(m), and date(d) appear in the dates. All inputed dates are considered to have the same order and the same separators.
ymd() type functions automatically assign the Universal
Coordinated Time Zone (UTC) to the parsed dates. This
time zone can be changed with force_tz
.
parse_date
x <- c("09-01-01", "09-01-02", "09-01-03")
ymd(x)
# "2009-01-01 UTC" "2009-01-02 UTC" "2009-01-03 UTC"
z <- c("2009-01-01", "2009-01-02", "2009-01-03")
ymd(z)
# "2009-01-01 UTC" "2009-01-02 UTC" "2009-01-03 UTC"
ymd(090101)
# "2009-01-01 UTC"
ymd(90101)
# "2009-01-01 UTC"
now() > ymd(20090101)
# TRUE
dmy(010210)
mdy(010210)
Run the code above in your browser using DataLab