sc_date_dif({Date1}, "Format Date1", {Date2}, "Format Date2")

Calculates the difference between two dates (passed as parameters) in days.

 

Parameter
Description
Date1 Date1 value or variable.
Format Date1

Value or Variable containing the date format stored on Date1.

Date2 Date2 value or variable.
Format Date2 Value or Variable containing the date format stored on Date2.



Ex. 1:
{amount_days} = sc_date_dif({date1}, "aaaa-mm-dd", {date2}, "mm/dd/aaaa");

 

Ex. 2:
{amount_days} =
sc_date_dif("2000-05-01", "aaaa-mm-dd", "04/21/2004", "mm/dd/aaaa");
{amount_days} would be equal to -1451 (days)



Note: Formats can be different but must be in days, months and years.