dateDiff: Compute difference between dates

View source: R/DbiDateFunctions.R

dateDiffR Documentation

Compute difference between dates

Description

This function is provided primarily to be used together with dbplyr when querying a database. It will also work in dplyr against data frames.

Usage

dateDiff(interval, date1, date2)

Arguments

interval

Unit for the interval. Can be "day", "week", "month", "year".

date1

The first date.

date2

The second date.

Value

The numeric value of the difference.

Examples

dateDiff("day", as.Date("2000-01-01"), as.Date("2000-03-01"))


DatabaseConnector documentation built on May 29, 2024, 6:14 a.m.