> For the complete documentation index, see [llms.txt](https://date.gitbook.io/dateall/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://date.gitbook.io/dateall/javascript/methods/date.getutcmilliseconds.md).

# Date.getUTCMilliseconds()

Returns the milliseconds, according to universal time (from 0-999)

The getUTCMilliseconds() method returns the milliseconds in the specified date according to universal time.

```javascript
var exampleDate = new Date('2018-01-02T03:04:05.678Z'); // 2 January 2018, 03:04:05.678 (UTC)

console.log(exampleDate.getUTCMilliseconds());
// expected output: 678

```

## Syntax <a href="#syntax" id="syntax"></a>

```javascript
dateObj.getUTCMilliseconds()
```

**Return value**

An integer number, between 0 and 999, representing the milliseconds in the given date according to universal time.

## Examples <a href="#examples" id="examples"></a>

#### Using `getUTCMilliseconds()` <a href="#using_getutcmilliseconds" id="using_getutcmilliseconds"></a>

The following example assigns the milliseconds portion of the current time to the variable `milliseconds`.

```javascript
var today = new Date();
var milliseconds = today.getUTCMilliseconds();
```

## References <a href="#references" id="references"></a>

{% embed url="<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getUTCMilliseconds>" %}

## Contributors to this page <a href="#contributors-to-this-page" id="contributors-to-this-page"></a>

Uros Durdevic
