# convertMsToSeconds

A Workflow Engine function that converts a millisecond timestamp to seconds.

If the supplied time is not a number, or if its length does not indicate a millisecond time value (if it does not have the same length as a current millisecond timestamp), then the function returns false.

This function is available for event, alert, and Situation workflows.

## Arguments

Workflow Engine function convertMsToSeconds takes the following arguments:

Name

Required

Type

Description

source

yes

string

The field (CEvent or WorkflowContext) to get the millisecond value from.

destination

yes

string

The field (CEvent or WorkflowContext) to write the converted seconds value to.

## Example

The following example demonstrates typical use of Workflow Engine function convertMsToSeconds.

To convert an agent_time value from milliseconds to seconds in the event workflow:

• Create a workflow using the convertMsToSeconds action.

• Set the parameters:

• source : agent_time

• destination : agent_time

This will appear in the UI as:

{"source":"agent_time","destination":"agent_time"}