This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

getUTCMilliseconds

Summary

Gets the milliseconds of a Date object using Universal Coordinated Time (UTC).

Syntax

dateObj.getUTCMilliseconds()

Return Value

Returns a millisecond value that can range from 0-999.

Examples

The following example illustrates the use of the getUTCMilliseconds method.

var date = new Date("1/1/2001");
 document.write(date.getUTCMilliseconds());
 document.write("<br/>");

 date.setMilliseconds(34);
 document.writedate.getUTCMilliseconds());

 // Output:
 // 0
 // 34

Remarks

The required dateObj reference is a Date object. To get the number of milliseconds in local time, use the getMilliseconds method.

See also

Other articles

Attributions

  • Microsoft Developer Network: Article