Date and Time Commands

Date and Time Commands allow you to perform complex calculations and comparisons with dates and times. The results of these calculations may be an end in themselves. But more often, they are utilized to direct the logical flow of the remainder of the wizard.

A NOTE ABOUT FORMATTING

Use the following formatting to ensure that your Date and Time Commands are executed properly:

Date:

  • Day: Use 1 or 2 digits (i.e., the first of the month could be entered as either as 1 or 01)

  • Month: Use 1 or 2 digits (i.e., August could be entered as either as 8 or 08)

  • Year: Use 4 digits (e.g., 1948)

Time:

  • Hour: Use 1 or 2 digits in 24-hour time notation (i.e., two o'clock in the morning could be entered as either as 2 or 02; two o'clock in the afternoon must be entered as 14)

  • Minutes: Use 1 or 2 digits (i.e., three minutes after the hour can be entered as either as 3 or 03)

  • Seconds: Use 1 or 2 digits (i.e., six seconds after the minute can be entered as either as 6 or 06)

Refer to the table below for a detailed overview of each command and its respective functionalities:

Command Description

Add/Subtract Date

Calculate a date by adding or subtracting days, months, and/or years to an existing date.

Add/Subtract Time

Calculate a time by adding or subtracting hours, minutes, and/or seconds to an existing time.

Calculate Date Range

Determine the number of days between 2 specified dates.

Calculate Time Range

Determine the number of hours, minutes, or seconds between 2 specified times.

Check Day of Week

Check the day of the week on which a specified date falls.

Compare Dates

Compare 2 dates (each stored in variables) and determine whether one is before, after, or equal to the other.

Compare Time

Compare 2 times (each stored in variables) and determine whether one is before, after, or equal to the other.

Convert Between Time Zones

Convert a date/time from an origin time zone to a destination time zone.

Format Date

Convert any date to:

  • Long date format (e.g., Monday, June 5, 2017)

  • Short date format (e.g., 6/5/2017)

  • A custom-defined date format (for details, see Specifying custom output formats)

Get Current Date

Retrieve the current day, month, or year (according to the system clock of the machine on which Nintex Robot is running) and place the result into a new or existing variable.

Get Current Time

Retrieve the current hour, minutes, or seconds (according to the system clock of the machine on which Nintex Robot is running) and place the result into a new or existing variable.

Get Day of Month

Retrieve the first or last day of any month. This command is most-often used in order to determine the first or last working day of a month.

Validate Date

Check whether the date parameters (day, month, and year) stored in 3 individual variables together constitute a valid date.