Javatpoint Logo
Javatpoint Logo

JavaScript Date getUTCSeconds() method

The JavaScript date getUTCSeconds() method returns the seconds for the specified date on the basis of universal time.

Syntax

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

Return

An integer value between 0 and 59 that represents the second.

JavaScript Date getUTCSeconds() method example

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

Example 1

Let's see an example to print the value of current second according to universal time.

Test it Now

Output:

Seconds Value : 51

Example 2

Let's see an example to print the value of seconds from the given date according to universal time.

Test it Now

Output:

Second value1 : 30
Second value2 : 50
Next TopicJavaScript Date





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