A workflow variable can have a datatype of boolean, date, integer, or string. You can assign a variable of one datatype to a workflow variable, parameter, literal value, task input, or task output of a different datatype if the Data Integration Service can convert the datatypes.
The following table describes the workflow variable datatype conversion that the Data Integration Service performs:
Variable Datatype
String
Integer
Boolean
Date
String
Yes
Yes
Yes
No
Integer
Yes
Yes
Yes
No
Boolean
Yes
Yes
Yes
No
Date
Yes
No
No
Yes
To convert a string to an integer, the string must contain a number.
To convert a string to a boolean, the string must contain either "true" or "false."
When the Data Integration Service converts an integer to a boolean, the service converts a value of zero (0) to false. The service converts any non-zero value to true.
When the Data Integration Service converts a boolean to an integer, the service converts a value of false to zero. The service converts a value of true to one (1).
When you run the workflow, the Data Integration Service converts the data to the valid datatype. For example, the StartTime system workflow variable has a date datatype. You can use this variable in the body string field of a Notification task. When you run the workflow, the Data Integration Service converts the date stored in the system workflow variable to a string.