Date/Time
(Available from version 7.0 onwards.)
Functions

Adds the specified number of days to the date.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Days |
Number |
The number of days to add to the selected date. |
Date |
DateTime |
The date to add the number of days to. |
Returns
Returns a date/time value
Example
This example adds 2 days to the selected date and returns 05/07/2017 05:00:00 AM into the TestDateTime variable.

Adds a specified number of hours to the specified date and time.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
hours | number | The number of hours to add |
date/time |
dateTime |
The date and time |
Returns
Returns a date/time value
Example
This workflow calculates the date and time 5 hours after the current date and time. The result is stored in the variable Delivery_DateTime.
When executed, Delivery_DateTime is set to 5 hours from the current time.

Adds a specified number of minutes to the specified date and time.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
minutes | number | The number of minutes to add |
date/time |
dateTime |
The date and time |
Returns
Returns a date/time value
Example
The workflow below calculates the date and time 30 minutes from the current date and time. The result is stored in the variable Next_Appointment.
When executed, Next_Appointment is set to 30 minutes from the current time.

Adds the specified number of months to the date.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Months |
Number |
The number of months to add to the selected date. |
Date |
DateTime |
The date to add the number of months to. |
Returns
Returns the date and time.
Example
This example adds 2 months to the selected date, that is, returns 03/09/2018 12:00:03 PM into the TestDateTime variable.

Adds the specified number of years to the date.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Years |
Number |
The number of years to add to the selected date. |
Date |
DateTime |
The date to add the number of years to. |
Returns
Returns the date and time.
Example
This example adds 2 years to the selected date, that is, returns 03/07/2020 12:00:00 PM into the TestDateTime variable.

Converts a specified date/time value to text and applies the specified date/time format to the text.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
date/time | dateTime | The date and time to convert |
date/time format |
text |
The format in which to express the date and time in text, for example:
More information about specifying date/time formats is provided at Microsoft.com. |
Returns
Returns text
Example
The workflow below populates three text variables with the same date and time information but in different formats.
When executed, the three text variables are populated with the same date and time but in three different formats.

Converts the local date and time to a date and time in the target time zone.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Local Time |
DateTime |
The local time to convert from. |
Target Time Zone Name |
Text |
The target time zone to convert to. Use the time zone names as listed by Microsoft. |
Returns
The converted date and time in DateTime format
Example
In this example:
- The variable CurrentTime is set to the current time.
- The variable ConvertedTime is set by converting CurrentTime to India Standard Time.
The current and converted times are displayed in the monitor.

Converts the date and time in local time, to a date and time in universal time (GMT).
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Local Time |
DateTime |
The local time. |
Returns
Returns a date and time.
Example
This example returns 03/07/2018 02:00:00 AM into the TestDateTime variable, when executed on a computer set to Israel Standard Time.

Converts specified text to a date/time value. Specify the current date/time format of the text.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
text | text | The text to convert |
date/time format |
text |
The format in which the date and time is expressed in the text provided, for example:
More information about specifying date/time formats is provided at Microsoft.com. |
Returns
Returns a date/time value
Example
The workflow below converts the text 2011, 06 - 10 (the 10th of June 2011), in format yyyy, MM - dd to a date/time value stored in the variable Var_DateTime.
When the workflow is run, Var_DateTime stores the converted date.

Gets the difference in complete days between the later date and the earlier date.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Later Date |
DateTime |
The later date. |
Earlier Date |
DateTime |
The earlier date. |
Returns
Returns the difference in days as a number.
Example
This example returns 6 into the TestNumber variable.

Gets the current date and time.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
None |
|
|
Returns
Returns a date and time.
Example
This example returns the current date into the TestDateTime variable.

Gets the day of the month.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Date and Time |
DateTime |
The date from which to extract the day of month. |
Returns
Returns the day as a number.
Example
This example returns 3 into the TestNumber variable.

Gets the day of the week. The returned value depends on which day of the week is set up as the first day of the week in Windows. For example, if Sunday is the first day of the week, then 2 is Monday, 3 is Tuesday, and so on.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Date Time |
DateTime |
The date from which to extract the Day Of Week. |
Returns
Returns the day as a number.
Example
This example returns 6 into the TestNumber variable, on a computer with Windows set to Start Of Week = Sunday.

Gets the date for the day, month and year.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Day |
Number |
The day. |
Month |
Number |
The month. |
Year |
Number |
The year. |
Returns
Returns a date and time.
Example
This example returns 31/12/2018 12:00:00 AM into the TestDateTime variable.

Gets the hour portion of the date and time.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Date Time |
DateTime |
The date. |
Returns
Returns the hour as a number.
Example
This example returns 7 into the TestNumber variable.

Gets the difference in hours between the later date and time, and the earlier date and time.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Later date |
datetime |
The later date and time. |
Earlier date |
datetime |
The earlier date and time. |
Returns
Returns the difference in hours as a number.
Example
This example returns 3 into the TestNumber variable.

Gets the minute of the date and time.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Date Time |
DateTime |
The date. |
Returns
Returns the minute as a number.
Example
This example returns 10 into the TestNumber variable.

Gets the difference in minutes between the later date and the earlier date.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Later Date |
datetime |
The later date. |
Earlier Date |
datetime |
The earlier date. |
Returns
Returns the number of minutes.
Example
This example returns 30 into the TestNumber variable.

Gets the month of the date and time.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Date Time |
DateTime |
The date. |
Returns
Returns the month as a number.
Example
This example returns 7 into the TestNumber variable.

Gets the day of the week, for example, Tuesday.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Date Time |
DateTime |
The date. |
Returns
Returns the day as text.
Example
This example returns Tuesday into the TestText variable.

Gets the difference, in seconds, between the later date and the earlier date.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Later Date |
DateTime |
The later date. |
Earlier Date |
DateTime |
The earlier date. |
Returns
Returns the difference in seconds as a number.
Example
This example returns 3901 into the TestNumber variable.

Gets the seconds portion of the date and time.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Date Time |
DateTime |
The date. |
Returns
Returns the seconds as a number.
Example
This example returns 15 into the TestNumber variable.

Gets the year portion of the date and time.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
Date Time |
DateTime |
The date. |
Returns
Returns the year as a number.
Example
This example returns 2018 into the TestNumber variable.

Subtracts a specified number of days from the date.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
dateTime |
datetime |
The date. |
Returns
Returns a date and time.
Example
This example returns 03/07/2018 07:35:00 AM into the TestDateTime variable.
Properties

Gets the current day of the month. This function is read-only and cannot be dragged onto your workflow canvas, but can be used as an input parameter for a function.
Returns
Returns the current day of the month as a number.
Example
This example returns 7 (when run on the 7th of any month) into the TestNumber variable.

Gets the current week of the year. This function is read-only and cannot be dragged onto your workflow canvas, but can be used as an input parameter for a function.
Returns
Returns the current week of the year.
Example
This example returns 49 (when run on the 7th of December 2018) into the TestNumber variable.

Gets the name of the current month. This function is read-only and cannot be dragged onto your workflow canvas, but can be used as an input parameter for a function.
Returns
Returns the current month.
Example
This example returns December (when run in December) into the TestText variable).