Use the To string action to convert a datetime value to a string value. This action enables you to select a predefined format or specify a custom format for the output value.

You can select a predefined format for datetime or provide a custom format based on your requirements. See Datetime formats.

To convert a datetime value to string, do the following:

Procedure

  1. Double-click or drag the To string action from the Datetime node in the Actions palette.
  2. From the Source date and time variable field, select either Datetime or Variable option.
    • If you selected the Datetime option, perform the following steps:
      1. Enter the date time value.
      2. Select the date time format.

        Choose from the prebuilt formats or provide a custom format. For more information about the prebuilt formats, see Datetime formats

    • If you selected the Variable option, perform the following steps:
      1. Select the variable that holds the datetime value you intend to convert into a string. To select the system date time, in the Variable field, enter $System:Date$

        Insert system date time

      2. Select the date time format.

        Choose from the prebuilt formats or provide a custom format. For more information about the prebuilt formats, see Datetime formats

  3. Select the string variable that you want to use to store the converted value from the Assign the output to a variable list.
  4. Click Save.