English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript getUTCMilliseconds() Method

 JavaScript Date Object

getUTCMilliseconds()Returns the milliseconds of a specific date object based on UTC (0-999)

getUTCMilliseconds()The returned value is from 0 to999The number between

Coordinated Universal Time (UTC) is the time standard set for world time.

Syntax:

date.getUTCMilliseconds()
var d = new Date();
d.getUTCMilliseconds();
Test and see‹/›

Browser Compatibility

All browsers fully support the getUTCMilliseconds() method:

Method
getUTCMilliseconds()IsIsIsIsIs

Technical Details

Return value:Between 0 and999The integer between them, representing milliseconds
JavaScript Version:ECMAScript 1

More Examples

Return the milliseconds for a specific date and time:

var d = new Date(#39;August 20, 1999 23:15:30:420');
d.getUTCMilliseconds();
Test and see‹/›

Display the time using the getUTCHours(), getUTCMinutes(), getUTCSeconds(), and getUTCMilliseconds() methods:

setInterval(function () {
   var d = new Date();
   var x = document.getElementById('result');
   x.innerHTML = d.getUTCHours() + :" + d.getUTCMinutes() + :" + d.getUTCSeconds() + 
   ':' + d.getUTCMilliseconds();
}, 1);
Test and see‹/›

 JavaScript Date Object