Excerpt | ||
---|---|---|
| ||
dateDiff(date1, date2) Return the time difference between two dates in milliseconds. |
Function: dateDiff()
Return the time difference between two dates in milliseconds.
Note |
---|
...
This function includes any variance for daylight savings changes. |
...
Use round() to remove these changes. |
Syntax
dateDiff(date1,date2)
Argument | Type | Description | |||
---|---|---|---|---|---|
date1 | Datedate | The original date/time | date2 | Date Fielddate or date-time. For the current date-time use the attribute function now(). | See Date-Time Functions for details about the arguments. |
date2 | dateField | The date to be subtracted from date1. |
Examples
dateDiff(now(),"20080101.130000") | Returns the number of milliseconds since 1pm on 1st January 2008. |
round(dateDiff("20200410.000000","20191217.000000")/(1000*60*60*24),0) | Returns the number of days between April 10th 2020 and December 17th 2019. The round() call removes any variance for daylight savings shifts. |
...
See Also
...
Excerpt | ||
---|---|---|
| ||
dateDiff(date1, date2) Return the time difference between two dates in milliseconds. |