DateDiff
Returns the numeric difference in the requested date part between two dates
Method Signature
Arguments
Argument
Type
Required
Description
Default
datepart
string
true
date1
any
true
The reference date object
date2
any
true
The date which to compare against date1
Examples
dateDiff Example
Find the difference between two dates.
Result: 10
How old are they?
Calculates a persons age based on a variable birthDate which contains a date. Uses the now function to get current date.
dateDiff member function
Additional Examples
Related
Last updated
Was this helpful?