Add a variable for the DateTime input
- Last UpdatedJan 21, 2026
- 1 minute read
Because of a difference in how Work Tasks and MES Stateless API methods treat DateTime inputs, you must create a DateTime variable to convert any DateTime input values from the workflow form from UTC time to local time. For additional information about this issue, refer to DateTime.
This test procedure includes an Event Time input in the workflow form. To address the DateTime issue for this input, perform the procedure in Adding a Variable for the DateTime Input to add the following variable:
-
The variable Event DateTime Local of type date and with the expression:
Convert.ToDateTime
(XmlVariables.SFFormData.SKRootDefinition.event_time, System.Globalization.CultureInfo.InvariantCulture)
.ToLocalTime()