# 

Scriptcase provides a very useful macro for manipulating dates, which is a very laborious process, however with the use of the sc\_date macro (Increments and Decrement Dates), it is much simpler, example:

sc\_date (Date, format, operator, D, M, A)

**date - Date field containing the date to be modified  
format - Formatting in which the date field is  
operator - "" for increment and "-" for decrement  
D - Number of days to increase or decrease  
M - Number of months to increase or decrease  
A - Number of years to increase or decrease**

E.g.1:  
  
{datanasc} = sc\_data ({datanasc}, "dd/mm/aaaa", " ", 30, 0, 0);

E.g.2:  
  
$nova\_data = sc\_data ({datanasc}, "aaaa-mm-dd", "-", 15, 3, 2);

E.g.3:  
  
{dt\_inclusao} = sc\_data (date('Ymd'), "aaaammdd", "-", 0, 1, 1);

Tip:  
  
To make sure the date format, before using the function, put a command in its formula:  
echo "form\_data =". {date field name};  
  
Run the application and see the correct format.