• JavaScript Video Tutorials

Date getUTCMilliseconds() Method



Description

Javascript date getUTCMilliseconds() method returns the milliseconds in the specified date according to universal time. The value returned by getUTCMilliseconds() is an integer between 0 and 999.

Syntax

Its syntax is as follows −

Date.getUTCMilliseconds()

Return Value

Returns the milliseconds in the specified date according to universal time.

Example

Try the following example.

<html>
   <head>
      <title>JavaScript getUTCMilliseconds Method</title>
   </head>
   
   <body>   
      <script type = "text/javascript">
         var dt = new Date();
         document.write("getUTCMilliseconds() : " + dt.getUTCMilliseconds() ); 
      </script>      
   </body>
</html>

Output

getUTCMilliseconds() : 206 
javascript_date_object.htm
Advertisements