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};
|
Macro Scope
|
Blank application
|
calendar application
|
chart application
|
Grid application
|
Dashboard
|
Search application
|
Form application
|
Control Form
|
Menu application
|
Responsive Menu
|
Tree menu
|
ReportPDF application
|
allMacros onExecute
|
ajaxFieldonBlur ajaxFieldonClick ajaxFieldonFocus allMacros onAfterDelete onAfterInsert onAfterUpdate onApplicationInit onBeforeDelete onBeforeInsert onBeforeUpdate onInit onLoadAll onRefresh onValidate onValidateFailure onValidateSuccess
|
allMacros onApplicationInit onFooter onHeader onInit
|
ajaxFieldonClick allMacros onApplicationInit onFooter onGroupBy onHeader onInit onNavigate onRecord
|
allMacros onApplicationInit onInit onWidgetLoad
|
allMacros onApplicationInit onFilterInit onFilterRefresh onFilterSave onFilterValidate
|
ajaxFieldonBlur ajaxFieldonClick ajaxFieldonFocus allMacros onAfterDelete onAfterDeleteAll onAfterInsert onAfterInsertAll onAfterUpdate onAfterUpdateAll onApplicationInit onBeforeDelete onBeforeDeleteAll onBeforeInsert onBeforeInsertAll onBeforeUpdate onBeforeUpdateAll onClick onInit onLoadAll onNavigate onRecord onRefresh onValidate onValidateFailure onValidateSuccess
|
ajaxFieldonBlur ajaxFieldonChange ajaxFieldonClick ajaxFieldonFocus allMacros onApplicationInit onClick onInit onLoadAll onRefresh onValidate onValidateFailure onValidateSuccess
|
allMacros onApplicationInit onExecute onLoad
|
onApplicationInit onExecute onLoad
|
allMacros onApplicationInit onExecute onLoad
|
allMacros onApplicationInit onFooter onHeader onInit onRecord
|
|