[Node.js] Create a Date object for the current time

Created on November 30, 2026

Call new Date() without arguments to create a Date object for the current instant. The value changes each time the code runs.

let currentDate = new Date();
console.log(currentDate);

This is one possible output from the Node.js console.

2022-07-22T16:17:56.310Z
Node.js