JavaScript getUTCMilliseconds() | Get the UTC Milliseconds

The JavaScript getUTCMilliseconds() method is used to get the milliseconds (0-999) according to Universal Time Coordinated (UTC) or Greenwich Mean Time (GMT). For example:

HTML with JavaScript Code
<!DOCTYPE html>
   <p id="xyz"></p>

      const d = new Date();
      let ms = d.getUTCMilliseconds();
      document.getElementById("xyz").innerHTML = ms;


JavaScript getUTCMilliseconds() Syntax

The syntax of getUTCMilliseconds() method in JavaScript is:


where x must be an object of the Date() constructor.

Please note: The getUTCMilliseconds() method returns a number from 0 to 999 which will be the milliseconds of the UTC time.

JavaScript Online Test

« Previous Tutorial Next Tutorial »

Follow/Like Us on Facebook

Subscribe Us on YouTube