sc_date(Date, "Format", "Operator", D, M, Y)

This macro has the aim to calculate the increment or decrement of dates. For its use are necessary some parameters as follows:

Parameter
Description
Date Date field that contains the date to be modified.
Format Formatting thats the date field is.
Operator "+" for increment and "-" for decrement.
D Number of days to increment or decrement.
M Number of months to increment or decrement.
Y Number of Years to increment or decrement.



Ex. 1:
{birthdate} = sc_date({birthdate}, "dd/mm/yyyy", "+", 30, 0, 0);

 

Ex. 2:
$new_date = sc_date({birthdate}, "yyyy-mm-dd", "-", 15, 3, 2);

 

Ex. 3:
{inclusion_dt} = sc_date(date('Ymd'), "yyyymmdd", "-", 0, 1, 1);

 

OBS: To be certified of the date format, before use the function, try it in any event:
echo "form_date =". {name of the field date};