JavaScript getUTCMilliseconds() Method
Example
Return the milliseconds of a time (0 to 999) based on universal time (UTC):
var d = new Date();
var n = d.getUTCMilliseconds();
n Output result:
Try it »
Definition and Usage
The getUTCMilliseconds() method returns the milliseconds of a time (0 to 999) based on universal time (UTC).
Coordinated Universal Time (UTC) is a time measurement system based on the atomic second, designed to stay as close as possible to universal time.
**Tip:** Coordinated Universal Time, also known as Universal Time, World Standard Time, or International Coordinated Time, abbreviated as UTC (Universal Coordinated Time).
**Note** UTC time is the same as GMT (Greenwich) time.
Browser support





All major browsers support the getUTCMilliseconds() method.
Syntax
Date
.getUTCMilliseconds()
Return Value
| Type | Description |
|---|---|
| Number | The value is an integer between 0 and 999. |
Technical Details
| JavaScript version: | 1.3 |
|---|
More examples
Example
Here we will extract the UTC milliseconds from a specific date and time:
var d = new Date("July 21, 1983 01:15:00:195");
var n = d.getUTCMilliseconds();
n Output result:
Try it »
Display the current UTC time
How to use getUTCHours(), getUTCMinutes(), and getUTCSeconds() to display the current UTC time.
JavaScript Date object