JavaScript Date now() Method Last Updated : 11 Jul, 2025 Suggest changes Share Like Article Like Report The Date.now() method in JavaScript returns the current timestamp in milliseconds since January 1, 1970. This method doesn’t require creating a new date object, making it one of the fastest and most efficient ways to capture the current time in your code.Syntaxlet curr_date = Date.now();ParametersThis method does not accept any parameter. Return ValuesIt returns the number of milliseconds elapsed since January 1, 1970, 00:00:00 UTC.Different Examples of Date now() MethodExample 1: The below example of the Date now() method. JavaScript // Use of method Date.now() let A = Date.now(); // Printing the number of millisecond elapsed console.log("The time elapsed in millisecond is: " + A); OutputThe time elapsed in millisecond is: 1720904397838 Explanation:The code snippet utilizes `Date.now()` to retrieve the current timestamp in milliseconds since the Unix epoch. It stores this value in variable `A` and prints it, indicating the elapsed milliseconds since the epoch.Example 2: This example of getting the current date using the Date.now() method. JavaScript // Use of Date.now() method let d = Date(Date.now()); // Converting the number of millisecond in date string a = d.toString() // Printing the current date console.log("The current date is: " + a) OutputThe current date is: Sat Jul 13 2024 20:59:57 GMT+0000 (Coordinated Universal Time) Explanation:The code snippet generates a new Date object using the current timestamp from Date.now(). It then converts this date object to a string format using .toString() and logs it, displaying the current date and time.We have a complete list of Javascript Date Objects, to check those please go through this Javascript Date Object Complete reference article P prateek sharma 7 Follow Article Tags : JavaScript Web Technologies javascript-date JavaScript-Methods Explore JavaScript BasicsIntroduction to JavaScript4 min readVariables and Datatypes in JavaScript6 min readJavaScript Operators5 min readControl Statements in JavaScript4 min readArray & StringJavaScript Arrays7 min readJavaScript Array Methods7 min readJavaScript Strings5 min readJavaScript String Methods9 min readFunction & ObjectFunctions in JavaScript5 min readJavaScript Function Expression3 min readFunction Overloading in JavaScript4 min readObjects in JavaScript4 min readJavaScript Object Constructors4 min readOOPObject Oriented Programming in JavaScript3 min readClasses and Objects in JavaScript4 min readWhat Are Access Modifiers In JavaScript ?5 min readJavaScript Constructor Method7 min readAsynchronous JavaScriptAsynchronous JavaScript2 min readJavaScript Callbacks4 min readJavaScript Promise4 min readEvent Loop in JavaScript4 min readAsync and Await in JavaScript2 min readException HandlingJavascript Error and Exceptional Handling6 min readJavaScript Errors Throw and Try to Catch2 min readHow to create custom errors in JavaScript ?2 min readJavaScript TypeError - Invalid Array.prototype.sort argument1 min readDOMHTML DOM (Document Object Model)9 min readHow to select DOM Elements in JavaScript ?3 min readJavaScript Custom Events4 min readJavaScript addEventListener() with Examples9 min readAdvanced TopicsClosure in JavaScript4 min readJavaScript Hoisting6 min readScope of Variables in JavaScript3 min readJavaScript Higher Order Functions7 min readDebugging in JavaScript4 min read My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like