The Format Data Time action is used to enter a date/time in a specified format and populate a variable with the result. The variable must be created in an earlier step using the Create Variable action.
You can specify the date and time in the properties dialog box, or you can use the current (at runtime) date/time or a user-entered date/time. Optionally, you can also adjust the date/time by a specified increment.
From the Task Builder Available Actions pane, open the Text folder and double-click the Format Date Time action or drag it into the Steps pane.
In the Date/time format box, select a format.
In the Populate variable with result box, select the variable to populate.
If you want to show the time in 24-hour format, clear the 12 hour format check box.
If you are using 12-hour format and want to include AM or PM, select Include AM/PM in result.
If you want to use a specified date/time or a user-entered date/time, or if you want to adjust the date/time, click the Advanced tab and enter the properties as follows:
To specify a date/time, click Use specified date time, and then click the Calendar button and use the calendar and digital clock to enter the date and time.
To use a user-entered date/time, click Prompt user and then enter a prompt message, such as Enter transaction date. The prompt will appear as a calendar or clock from which the user can select the date and/or time. Select from the drop-down list to specify whether to prompt for date, time, or both date and time.
If you want to populate the variable with an adjusted date/time, enter the adjustment amounts in the boxes under Adjust. Enter positive numbers to adjust into the future and negative number to adjust into the past. For example, in the Year box, 2 specifies two years later and -2 specifies two years earlier.
To set the Description tab properties, refer to Description Tab Options.
To set the Error Causes and On Error tab properties, refer to Step Error Handling.
When finished, click OK to save settings and close the properties dialog window.
Adding Task Steps
Format Date/Time Action