Format Date and Time
Use this action to format the date and time.
Using Format Date and Time Action
To use this action in your workflow, connect it to ThingWorx Flow. To connect to the flow, do the following:
1. Click and drag the Format Date and Time action under the Developer Tools utility to the canvas, place the pointer on the action, and then click or double-click the action. The Format Date and Time action window opens.
2. Edit the Label name, if needed. By default, the label name is same as the action name.
3. Under the Input Formatting section, in the Set Date Time field, enter a custom date in the ISO 8601, MM-DD-YYYY:mm:ss or any standard format. To set the current system date and time, enter now.
4. Under the Output Formatting section, enter the following details:
a. In the Set Locale (Language) field, select the language. The resultant date and time are displayed in the selected language in the output.
b. In the Format Type list, select one of the following:
Standard—Displays the date and time in one of the selected standard formats. The standard formats are available in the Select Output Format list.
Relative—Displays the time with respect to the specified Start Date Time in humanized format such as 3 months ago.
Calendar—Displays the time in the calendar format such as Today at 11:56 AM.
5. Depending on the Format Type that you have selected, complete one of the following steps:
If you have selected the Standard format, complete the following steps:
1. Under the Transform Output section, in the Add Minutes field, enter the value to be added to transform the output.
2. In the Subtract Minutes field, enter the value to be subtracted to transform the output.
3. In the Select Output Format list, select one of the standard output formats.
4. In the Set Custom Output Format field, set the date time format For example, MM-DD-YYYY:mm:ss or any standard format.
* 
This field is applicable only when the Select Output Format is set to custom.
If you have selected the Relative format, complete the following steps:
1. Under the Output Formatting section, in the Remove Suffix list, select one of the following options:
false
true
2. In the Relative list, select one of the following options:
From
From Now
To
To Now
3. In the Start Date Time field, enter the date and time in the ISO 8601, MM-DD-YYYY:mm:ss or any standard format.
* 
This field is applicable only if you have selected To or From in the Relative list.
If you have selected the Calendar format, you can proceed with the next step.
6. Click Done.
Output Schema
The Format Date and Time action returns an output schema depending on the options that you select. See a sample output schema in the figure that follows:
Was this helpful?