Contents
Display Legacy Contents

 Print
    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.

     
Example 1
  Example 2
DateDiff("20100307", "20100301")

Result = 6
  DateDiff("20100301", "20100307")

Result = 6

     
  • 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.

See also
Samples
Sample 1
Sample 2
 
Updated: 3/22/2013 4:16 PM