- Instant help with your JavaScript coding problems

Get the current date in JavaScript

How to get the current date in JavaScript?
let now = new Date();

console.log('The current date is: ' + now);

JavaScript Date objects represent a single moment in time in a platform-independent format. Date objects contain a Number that represents milliseconds since 1 January 1970 UTC.

The Date() constructor creates a new Date object with the actual time value.

Date manual
Share "How to get the current date in JavaScript?"