Learn how to put your digital team to work with MuleSoft for Agentforce.
Contact Us 1-800-596-4880

toMilliseconds

toMilliseconds(date: DateTime): Number

Returns the representation of a specified date-time in milliseconds.

Parameters

Name Description

date

A DateTime to evaluate.

Example

This example shows a date-time in milliseconds.

Source

%dw 2.0
import * from dw::util::Timer
output application/json
---
{ "toMilliseconds" : toMilliseconds(|2018-07-23T22:03:04.829Z|) }
Dataweave

Output

{ "toMilliseconds": 1532383384829 }
XML