JavaScript getUTCMilliseconds()Method
Example
Returns the milliseconds (0~999) of the time according to Universal Time (UTC):
var n = d.getUTCMilliseconds();
nOutput:
Try it Yourself »
Definition and Usage
The getUTCMilliseconds() method returns the milliseconds (0~999) of the time according to Universal Time (UTC).
Coordinated Universal Time (UTC) is a time measurement system based on the atomic second, which is as close as possible to Universal Time in terms of time moments.
Tip:Coordinated Universal Time, also known as Universal Time Coordinated, World Standard Time, International Coordinated Time, abbreviated as UTC (Universal Coordinated Time).
NoteUTC time is the same as GMT (Greenwich) time.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the getUTCMilliseconds() method
Syntax
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 n = d.getUTCMilliseconds();
nOutput:
Try it Yourself »
Display the current UTC time
How to use getUTCHours(), getUTCMinutes(), and getUTCSeconds() to display the current UTC time.
Other Extensions
JavaScript Date Object