---
schema_version: "1"
id: ba2d07f76071ef8fed57a2815c8297aec5412c018acc42753443b432de099383
title: toMilliseconds
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/latest/dw-timer-functions-tomilliseconds.md
canonical_url: https://docs.mulesoft.com/dataweave/latest/dw-timer-functions-tomilliseconds
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 0cccf4a5fcad9f62c1781658c92e11781bced9e91954b65d65942e9c6594716e
description: MuleSoft Documentation Site
release: "2.13"
latest: true
---
---
product: DataWeave
version: 2.13
is-latest-version: true
---

# toMilliseconds

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## toMilliseconds(date: DateTime): Number

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

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>date</code></p></td><td><p>A <code>DateTime</code> to evaluate.</p></td></tr></tbody></table>

### Example

This example shows a date-time in milliseconds.

#### Source

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

#### Output

```XML
{ "toMilliseconds": 1532383384829 }
```
