Calculate Date
This activity allows you to take a Date Time value and add or subtract seconds from it. For example, you could take the current time, add 86400 seconds to it, and have the same time tomorrow.
Usage
This activity expects two inputs:
-
A starting Date Time which can be entered as a string or from a Date Time variable.
-
An adjustment to the original date in seconds. By default, the number of seconds provided is added to the date. If you provide a negative number of seconds, such as -86400, the adjustment is subtracted instead. The activity output is the new Date Time.
Note: When you use the variable browser to choose this activity output, be careful which variable you select. Every activity has a Start time and End time, which represent when the activity started and stopped running. The output from this activity is in the Result variable.
Supported Date Formats
The following date formats can be used as input into this activity. You can also use a DateTime variable.
Format Name | Example |
---|---|
ANSIC | Mon Jan 2 15:04:05 2018 |
UnixDate | Mon Jan 2 15:04:05 MST 2018 |
RubyDate | Mon Jan 02 15:04:05 -0700 2018 |
RFC822 | 02 Jan 18 15:04 MST |
RFC822Z | 02 Jan 18 15:04 -0700 |
RFC850 | Monday, 02-Jan-18 15:04:05 MST |
RFC1123 | Mon, 02 Jan 2018 15:04:05 MST |
RFC1123Z | Mon, 02 Jan 2018 15:04:05 -0700 |
RFC3339 | 2018-01-02T15:04:05-07:00 |
RFC3339Nano | 2018-01-02T15:04:05.999999999-07:00 |
Custom Formats |
Note: In European time format, 01 always stands for Month and 02 stands for Day. |
Sample Workflows
The following sample workflows are available in our repository’s workflows folder to help you get familiar with this concept. These can be imported using the instructions in Import Git Content or you can click the workflow to view it in GitHub.