powered by
This function is provided primarily to be used together with dbplyr when querying a database. It will also work in dplyr against data frames.
dbplyr
dplyr
dateDiff(interval, date1, date2)
The numeric value of the difference.
Unit for the interval. Can be "day", "week", "month", "year".
The first date.
The second date.
dateDiff("day", as.Date("2000-01-01"), as.Date("2000-03-01"))
Run the code above in your browser using DataLab