DroidScript

JavaScript Reference

dateObj.getMilliseconds()

The getMilliseconds() method returns the milliseconds in the specified date according to local time.

Syntax

dateObj.getMilliseconds()

Parameters

None.

Returns

The value returned by getMilliseconds() is a number between 0 and 999.

Examples

Using getMilliseconds()

The following example assigns the milliseconds portion of the current time to the variable milliseconds:

var today = new Date();
var milliseconds = today.getMilliseconds();

 Created by Mozilla Contributors and licensed under CC-BY-SA 2.5