Date getUTCMilliseconds() Method - Javascript Date

Javascript examples for Date:getUTCMilliseconds


The getUTCMilliseconds() method returns the milliseconds (from 0 to 999), according to universal time.

UTC time is the same as GMT time.



Return Value:

A Number, from 0-999, representing milliseconds

The following code shows how to return the milliseconds, according to UTC:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>

<button onclick="myFunction()">Test</button>

<p id="demo"></p>

function myFunction() {/*from w ww.ja va  2 s. c  o m*/
    var d = new Date("July 21, 2020 01:15:00:195");
    var n = d.getUTCMilliseconds();
    document.getElementById("demo").innerHTML = n;


Related Tutorials