YouTip LogoYouTip

Jsref Getmilliseconds

# JavaScript getMilliseconds() Method [![Image 9: Date Object Reference](#) JavaScript Date Object](#) ## Example Returns the milliseconds of the time based on local time: ```javascript var d = new Date(); var n = d.getMilliseconds(); _n_ Output: 439 [Try it yourself Β»](#) * * * ## Definition and Usage The getMilliseconds() method returns the milliseconds of a time. * * * ## Browser Support ![Image 10: Internet Explorer](#)![Image 11: Firefox](#)![Image 12: Opera](#)![Image 13: Google Chrome](#)![Image 14: Safari](#) The getMilliseconds() method is supported by all major browsers. * * * ## Syntax _Date_.getMilliseconds() ## Return Value | Type | Description | | --- | --- | | Number | Returns an integer between 0 and 999, representing the milliseconds. | ## Technical Details | JavaScript Version: | 1.3 | | --- | * * * ## More Examples ## Example Returns the milliseconds of a specified time: ```javascript var d = new Date("July 21, 1983 01:15:00:526"); var n = d.getMilliseconds(); _n_ Output: 526 [Try it yourself Β»](#) ![Image 15: Examples](#) (#) How to use getHours(), getMinutes(), getSeconds(), and getMilliseconds() to display the current time. * * JavaScript Date Object](#)
← Jsref GetminutesFunc Xml Set Unparsed Entity D β†’