How to add number of days to a specific date?
Last Update: November 10, 2017
Here are the steps on how to add number of days to a specific date:
- Open the form in
design mode.
- Add two Date controls to the form design area named Date1 and Date2.
- Select the Date1 control.
- In the
Rules pane, click on the Add icon to add a new rule, the
Rule Manager dialog will open.

- Add a new rule at Date1 control as follows:
A. Update the Rule Name as desired.
B. Change the Rule Type to Action.
C. Change the Event Type onChange. Leave "Execute if event triggered only on this control" unchecked.
D. In the Action section, type the following script:
setValue(Date1, addDateTime(getValue(Date1),'Days','10')) //where 10 is number of days to add to Date1.
E. Click on the
Save button to save the rule.
Note: You can use
Assistance Panel to help you adding functions and related parameters, form variables and form controls to
Conditions and/or
Actions sections. - Test the form by clicking on the
Preview button in the
View group.