You can use the Date constructor which takes in a number of milliseconds and converts it to a JavaScript date:

var d = new Date(Date.now());
d.toString() // returns "Sun May 10 2015 19:50:08 GMT-0600 (MDT)"

In reality, however, doing Date(Date.now()) does the same thing as Date(), so you really only have to do this:

var d = new Date();
d.toString() // returns "Sun May 10 2015 19:50:08 GMT-0600 (MDT)"
Answer from Sumner Evans on Stack Overflow
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ JavaScript โ€บ Reference โ€บ Global_Objects โ€บ Date โ€บ now
Date.now() - JavaScript | MDN
You can use Date.now() to get the current time in milliseconds, then subtract a previous time to find out how much time elapsed between the two calls.
๐ŸŒ
W3Schools
w3schools.com โ€บ jsref โ€บ jsref_now.asp
JavaScript Date now() Method
Date.now() returns the number of milliseconds since January 1, 1970.
๐ŸŒ
Time and Date
timeanddate.com
Time and Date
Add or subtract days, months, or years to or from a specific date.
๐ŸŒ
Educative
educative.io โ€บ answers โ€บ what-is-datenow-in-javascript
What is Date.now() in Javascript?
In the code below, we use the returned milliseconds of Date.now() as a parameter to a date object.
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ JavaScript โ€บ Reference โ€บ Global_Objects โ€บ Date
Date - JavaScript | MDN
Due to the differing lengths of days (due to daylight saving changeover), months, and years, expressing elapsed time in units greater than hours, minutes, and seconds requires addressing a number of issues, and should be thoroughly researched before being attempted. ... // Using Date objects const start = Date.now(); // The event to time goes here: doSomethingForALongTime(); const end = Date.now(); const elapsed = end - start; // elapsed time in milliseconds
๐ŸŒ
Epoch Converter
epochconverter.com
Epoch Converter - Unix Timestamp Converter
Some systems store epoch values as signed 32-bit integers, which can break on January 19, 2038, in the Year 2038 Problem. This page converts timestamps in seconds (10 digits), milliseconds (13 digits), and microseconds (16 digits) into readable dates. The first line for each language shows how to get the current epoch time.
๐ŸŒ
Sololearn
sololearn.com โ€บ en โ€บ Discuss โ€บ 2967337 โ€บ new-date-vs-datenow
new Date vs Date.now() | Sololearn: Learn to code for FREE!
โ€ข new Date() - creates a Date object representing the current date/time โ€ข Date.now() - returns the number of milliseconds since midnight 01 January, 1970 UTC As a matter of style, I found it clearer to use Date.now() in code that deals with intervals (usually subtracting an earlier date from a later date to calculate the time elapsed), and new Date() for timestamps, e.g.
Find elsewhere
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ javascript โ€บ javascript-date-now-method
JavaScript Date now() Method - GeeksforGeeks
July 11, 2025 - The code snippet utilizes `Date.now()` to retrieve the current timestamp in milliseconds since the Unix epoch.
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ javascript-date-now-how-to-get-the-current-date-in-javascript
JavaScript Date Now โ€“ How to Get the Current Date in JavaScript
June 15, 2020 - It returns the value in milliseconds that represents the time elapsed since the Epoch. You can pass in the milliseconds returned from the now() method into the Date constructor to instantiate a new Date object:
๐ŸŒ
MathWorks
mathworks.com โ€บ matlab โ€บ language fundamentals โ€บ data types โ€บ dates and time
now - (Not recommended; use datetime) Current date and time as serial date number - MATLAB
To return the current date and time as a datetime value, call datetime. You can call it without any input arguments, or with "now" as the input argument.
๐ŸŒ
W3Schools
w3schools.com โ€บ js โ€บ js_date_methods.asp
JavaScript Get Date Methods
The syntax is always Date.now(). UTC methods use UTC time (Coordinated Universal Time). UTC time is the same as GMT (Greenwich Mean Time). The difference between Local time and UTC time can be up to 24 hours.
๐ŸŒ
Programiz
programiz.com โ€บ python-programming โ€บ datetime โ€บ current-datetime
How to get current date and time in Python? (With Examples)
If we need to get the current date and time, you can use the datetime class of the datetime module. from datetime import datetime # datetime object containing current date and time now = datetime.now() print("now =", now) # dd/mm/YY H:M:S dt_string = now.strftime("%d/%m/%Y %H:%M:%S") print("date ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ javascript โ€บ difference-between-new-date-and-datenow-in-javascript
Difference Between new Date() and Date.now() in JavaScript - GeeksforGeeks
August 5, 2025 - In JavaScript, handling dates and times is essential for various applications from displaying the current date to performing complex calculations involving time differences. Two commonly used methods for working with the dates are new Date() and Date.now().
๐ŸŒ
Epoch Converter
epochconverter.com โ€บ epoch converter โ€บ what's the current day number?
What's the Current Day Number? - Epoch Converter
Replace now() with other dates eg.: ... int currentDay; dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"D"]; date = [NSDate date]; currentDay = [[dateFormatter stringFromDate:date] intValue]; select to_char(sysdate, 'DDD') from dual select to_char(to_date('2026-02-20','YYYY-MM-DD'), 'DDD') from dual
๐ŸŒ
date-fns
date-fns.org
date-fns - modern JavaScript date utility library
date-fns provides the most comprehensive yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js.
๐ŸŒ
Moment.js
momentjs.com โ€บ docs
Moment.js | Docs
Get + Set Millisecond Second Minute Hour Date of Month Day of Week Day of Week (Locale Aware) ISO Day of Week Day of Year Week of Year Week of Year (ISO) Month Quarter Year Week Year Week Year (ISO) Weeks In Year Weeks In Year (ISO) Get Set Maximum Minimum ยท Manipulate Add Subtract Start of Time End of Time Maximum Minimum Local UTC UTC offset Time zone Offset ยท Display Format Time from now Time from X Time to now Time to X Calendar Time Difference Unix Timestamp (milliseconds) Unix Timestamp (seconds) Days in Month As Javascript Date As Array As JSON As ISO 8601 String As Object As String Inspect
๐ŸŒ
RapidTables
rapidtables.com โ€บ tools โ€บ todays-date.html
Today's Date | Current date now ๐Ÿ“…
Homeโ€บToolsโ€บCurrent date now ยท Today's current date and time with time zone and date picker: This page includes the following information: Today's date: day of week, month, day, year. Current time: hours, minutes, seconds. Time zone with location and GMT offset.
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ dotnet โ€บ api โ€บ system.datetime.now
DateTime.Now Property (System) | Microsoft Learn
Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time. public: static property DateTime Now { DateTime get(); };