Subtract Date Step
The Subtract Date step figures out the difference between two dates and times. It gives you the answer in a format you pick, like days or hours. You can save this difference to a new or existing variable.
How to Use the Subtract Date Step
Use this step to find how much time passes between two specific moments.
Step 1: Add the Subtract Date Step
- Open your process in the Robotiq.ai Process Editor.
- Drag the Subtract Date step into your workflow.
Step 2: Set Up Input Parameters
- Subtract date: Pick an existing datetime variable, or use the date/time picker to type in a specific date and time. This is the value that gets subtracted.
- From date: Pick an existing datetime variable, or use the date/time picker to type in a specific date and time. This is the value you're subtracting from.
- Get difference in: Choose the unit for your result.
- Seconds
- Minutes
- Hours
- Days
- Months
- Years
Step 3: Set Up Output Variable
- Difference: Type the name of an existing integer variable or make a new one. This variable will hold the calculated difference.
Parameters Explained
Step name (Optional)
- A custom name for this step in the Process Editor.
Subtract date (Required)
- The date and time value to subtract.
- Example:
2023-01-15 10:00:00or a variable like{{startDate}}. - You can pick a value from a date/time picker or use a variable.
From date (Required)
- The date and time value you're subtracting from.
- Example:
2023-01-20 12:00:00or a variable like{{endDate}}. - You can pick a value from a date/time picker or use a variable.
Get difference in (Required)
- The unit for the calculated difference.
- Options:
Seconds,Minutes,Hours,Days,Months,Years. - Example: If you pick
Days, the output will be the number of days between the two dates.
Difference (Required)
- The variable where the calculated difference will be saved. This variable must be an integer.
- Example:
{{timeDifference}}. - You can use an existing variable or make a new one.
Related Articles
Need Help?
Can't find what you're looking for? Join the Robotiq Community to get help from other users and the Robotiq team.