clsDateTimetoUTC Step

Use this step to convert datetime to UTC

Last published at: July 27th, 2024

Description:

This step converts datetime with time zone to UTC.

 

Inputs

  • datetime - Provide the date time value
  • timezone - Select the time zone for the date time value (optional)
  • utcVarGlobal - Select variables/globals to store UTC date time
  • multiple date times - Define multiple date-time values for conversion
 

 

Returns

  • True – step executed successfully 
  • False – step failed to execute
 

 

Usage:

 

 

Example:

Let’s build and execute the clsDateTimeToUTCDef example.

  • Create a new definition called “clsDateTimeToUTCDef
  • Select the definition and click the “design” button
  • Drag the above controls to the canvas
  • Connect the dots between the controls as above
  • Define a variable/global to store the result after execution

 

  • Click the “UpdateVariables” step to configure its “Settings” properties. Provide a step name. Click on the Save button to confirm. 

 

  • Click the “UpdateVariables” step to configure its “Advanced” properties. Provide a variable/global reference and its value to update a single variable. Click on the button to update multiple variables. The Update Multiple Variables popup window is displayed below. Click on the Add Row (+) button to insert an empty row. Provide the variable name and its date-time value. Click the Save button to confirm. 

 

  • Click on the “clsDateTimeToUTC” step to configure its “Settings” properties as shown below. Provide the datetime value manually or mention the variable/global reference having a datetime value. To store the converted UTC datetime, provide a variable/global reference. Click the Save button to confirm.  

 

  • Click on the “clsDateTimeToUTC” step to configure its “Advanced” properties. Select the time zone from the drop-down list. Select the preferred time zone as a reference for conversion, or leave it unselected as it's optional. Click on the button to update multiple datetime values. 

 

  • Click on the button to update multiple datetime values. The Update Multiple DateTimes popup window is displayed. Click on the Add Row (+) button to insert an empty row. Provide the variable/global reference for the datetime. Provide the variable/global reference which holds the UTC value. Click the Save button to confirm. 

 

  • The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

 

  • The time zone value (when unselected) takes the reference from the FW database - deConfig table (shown below), and this can be configured with any global time zone name. This deConfig - ConfigKey is defined manually with earlier FlowWright versions. In this example, the ConfigKey is referring to the FINNISH timezone. The default time zone can be configured by navigating to the Status - Status - Information - Culture page. 

 

  • Save the process definition, create a process instance, and execute. Check the step properties by rendering the workflow instance. clsDateTimeToUTC step should convert the provided date time (with time zone) to UTC, as shown in the graphic below. 

 

  •  clsDateTimeToUTC step should convert the multiple date times (with time zone) to UTC, as shown in the graphic below.