Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the milliseconds value in a Date object using local time.
dateObj.getMilliseconds()
Remarks
The required dateObj reference is a Date object.
To get the number of milliseconds in Universal Coordinated Time (UTC), use the getUTCMilliseconds method.
The millisecond value returned can range from 0-999.
Example
The following example illustrates the use of the getMilliseconds method.
function TimeDemo(){
var d, s = "The current local time is: ";
var c = ":";
d = new Date();
s += d.getHours() + c;
s += d.getMinutes() + c;
s += d.getSeconds() + c;
s += d.getMilliseconds();
return(s);
}
Requirements
Applies To: Date Object (JScript 5.6)
See Also
Reference
getUTCMilliseconds Method (JScript 5.6)
setMilliseconds Method (JScript 5.6)
setUTCMilliseconds Method (JScript 5.6)