DateDiff()
Returns the difference between two dates or times.
The DateDiff()
function has three parameters:
startDate
(date): Required. The starting date for the comparison.endDate
(date): Required. The date to subtract from the starting date.unitOfDifference
(string): Required. The unit of time difference to return. Accepted values:Y
(years),M
(months),D
(days),H
(hours), andMI
(minutes).
This example adds one day to the current timestamp, and then uses the DateDiff()
function to calculate the number of minutes until the new date. For the purpose of illustration, the example assumes that the current timestamp is 2023-08-05T13:41:23Z.
The function outputs the number of minutes until tomorrow.