Javatpoint Logo
Javatpoint Logo

JavaScript Date getMilliseconds() method

The JavaScript date getMilliseconds() method returns the value of milliseconds in specified date on the basis of local time.

Syntax

The getMilliseconds() method is represented by the following syntax:

Return

An integer value between 0 and 999 that represents milliseconds in specified date.

JavaScript Date getMilliseconds() method example

Here, we will understand getMilliseconds() method through various examples.

Example 1

Let's see an example to print current milliseconds.

Test it Now

Output:

238

Example 2

Let's see an example to print the value of milliseconds from the given time.

Test it Now

Output:

565

Example 3

Let's see an example to print complete current time.

Test it Now

Output:

13: 43: 32: 963

Next TopicJavaScript Math





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA