powered by
Convert calendar date to integer day from a reference date (ref).
ref
dateToDay(date, ref = NULL)
Numeric value(s) of days from ref.
A date or vector of dates to convert to days.
Reference date.
x <- c("2018-01-01", "2018-02-01") dateToDay(x, x[1])
Run the code above in your browser using DataLab