Format date to string

Use the Format date to string action A tool for building the processes, logic, and direction within workflows. Actions are the steps the workflow performs to complete a process. to change a DateTime value to a Text string value.

For the Text string value which the actions outputs, you can configure:

  • The date/time format.
  • The time zone which the value is converted to.
  • The inclusion of the time zone.

For example, users enter a DateTime value into a Nintex form field in New York, USA. You want to use the DateTime value in an email generated by another action later in the workflow. However, the recipients of the email are located in London, England. You use the Format date to string action to change the DateTime value submitted in the form to the local London time for the recipients.

You configure the action to change DateTime values to a DD/MM/YY format, with a Europe/London time zone, and to include the time zone in the output Text string value. The action changes a New local time DateTime value of January 1, 2019 11:22 PM to a Text string value of 2019-01-02 04:00:00 [UTC+00:00].

Configure the Format date to string action

  1. Add the action to the workflow and open the action configuration panel. For more information, see Add an action to the workflow.

  2. Click the Format date to string action.
  3. Click DateTime and select the Date value.
  4. Select the required Format.
    For more information, see DateTime formats with examples.
  1. Select a variable for Output date as a string, which stores the converted Text string value.

Format date to string action fields and settings

Field

Description

Variable

Date

The DateTime value which the action changes to a Text string value.

DateTime

Format

The DateTime value is updated according to the selected format.

(n/a)

Convert to time zone (Default is UTC)

The time zone the action changes the DateTime value to.

(n/a)

Include time zone in output

Select whether to include the time zone in the converted Text string value.

Example of Text string value which includes the time zone (shown in bold):

  • December 12 2018 03:40:00 [UTC+00:00]

Boolean

Output date as string

The variable which stores the Text string value for the changed date.

Text