The DIFF-DATE directive calculates the difference between two dates.
Syntax
Code Block |
---|
diff-date :column1 :column2 :destination |
Usage Notes
The DIFF-DATE directive calculates the difference between two Date objects (<column1>
minus <column2>
) and puts the difference (in milliseconds) into the destination column.
...
If you use PARSE-AS-DATE and one of the dates in the column is null
, the resulting column will be null
. If any of the columns contains the string now
, then the current date-time will be substituted for it. When now
is encountered, the directive applies the same value for now
across all rows.
Example
Using this record as an example:
...