dateDiff(interval, date1, date2)

Return the difference in the interval between the two given dates. For the valid interval values, please refer to the table under dateAdd() function discussion.

Parameters

interval The date interval for which the difference is

to be calculated.

date1, date2 The dates to be compared.

Example

dateDiff('m', new Date(), dateAdd('m', 2, new Date()));

// returns 2.

<< dateAdd(interval, amount, date) © 1996-2013 InetSoft Technology Corporation (v11.5) datePart(interval, date) >>