Computer Science, asked by ShadowCain9609, 1 year ago

How to get current date and time in JavaScript?

Answers

Answered by Anonymous
0

Use Date() function to create an object in JavaScript with current date and time.

...

2. Current Time in JavaScript

getHours() – Provides current hour between 0-23.

getMinutes() – Provides current minutes between 0-59.

getSeconds() – Provides current seconds between 0-59.

Similar questions