for workflow variables with a date datatype. You can use an Assignment task to change the default format of a date variable.
Use an Assignment task to convert the date value to a string value with a specified date format. Then, assign the converted value to a string workflow variable.
Create a user-defined workflow variable with a string datatype.
Add an Assignment task to the workflow after the task that assigns a run-time value to the date workflow variable.
Connect the Assignment task to other objects in the workflow.
Select the Assignment task in the editor.
In the
Properties
view, click the
Assignment
tab.
In the
User-defined Variable
column, select the string workflow variable.
Click the arrow in the
Expression
column.
The
Assignment Expression Editor
appears.
Enter the following expression to convert the value of the date workflow variable to a string value with the specified date format: