Date Difference
This Function returns a <numeric>, which is the number of days between the specified Date 1 and Date 2.
Parameters
- Date 1 <string> - Date to subtract the Date 2 from. This parameter must be in format YYYYMMDD.
- Date 2 <string> - Date to subtract from Date 1. This parameter must be in format YYYYMMDD.
Examples
- Example 1
DateDiff("20100307", "20100301")
Result = 6
- Example 2
DateDiff("20100301", "20100307")
Result = 6
info
If Date 1 is later than Date 2, the parameters order is inverted in runtime. Therefore, the result of this function is always a positive number or zero.