Date and Time Manipulation
Date and Time Manipulation
Applies one or more operations of adding or subtracting time units to a base date, returning the resulting date. Ideal for calculating deadlines, due dates, accounting periods or any situation that requires navigating the calendar from a known date.
Options
Date Input Format
Select the format in which the input date is written. The format must match exactly the date provided. The available options are: DD/MM/YYYY, DD/MM/YYYY HH:mm:ss, DD [de] MMMM [de] YYYY, HH:mm, HH:mm:ss, HH:mm:ss:SSS, YYYY-MM-DD and YYYY-MM-DD HH:mm:ss.
Inform the date
Enter the base date on which the operations will be applied. It can be a fixed text, a variable, a parameter or the return of another action.
Available manipulation functions
Add one or more operations to be applied to the date. Each operation contains:
- Manipulation function — choose between Add to the date (move forward in time), Subtract from the date (move backward in time), Start the date at (go to the start of the chosen unit, for example the first day of the month) or End the date at (go to the end of the chosen unit, for example the last day of the month)
- Amount — enter the numeric value of the operation (minimum 1). Only shown for Add to the date and Subtract from the date
- Unit of time — select the time unit: day, week, month, year, hour, minute or second
The operations are executed in sequence, in the order in which they were added.
Returns
Javascript code
actions["action-id"].date // resulting date after all the operations are applied (Text)
Field selection
- date — resulting date after the manipulations, in the
DD/MM/YYYY HH:mm:ssformat (Text)
Rules and Conditions
- The date provided must match the Date Input Format selected.
- If the Inform the date field is left empty, the current date is used.
- Without any operation added, the action only returns the date provided in the
DD/MM/YYYY HH:mm:ssformat. - The operations are applied in cascade — the result of one is the base of the next.