I hope this is what you want:

const today = new Date();
const yyyy = today.getFullYear();
let mm = today.getMonth() + 1; // Months start at 0!
let dd = today.getDate();

if (dd < 10) dd = '0' + dd;
if (mm < 10) mm = '0' + mm;

const formattedToday = dd + '/' + mm + '/' + yyyy;

document.getElementById('DATE').value = formattedToday;

How do I get the current date in JavaScript?

Answer from Aelios on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Date
Date - JavaScript | MDN
Due to the differing lengths of ... 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; ...
🌐
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:
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Date › now
Date.now() - JavaScript | MDN
const start = Date.now(); doSomeLongRunningProcess(); console.log(`Time elapsed: ${Date.now() - start} ms`);
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › standard › base-types › custom-date-and-time-format-strings
Custom date and time format strings - .NET | Microsoft Learn
Dim thisDate1 As Date = #6/10/2011# ... H:mm:ss zzz}", thisDate2) ' The example displays the following output: ' Today is June 10, 2011....
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-date-now-method
JavaScript Date now() Method - GeeksforGeeks
July 11, 2025 - ... // 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) ... The code snippet generates a new Date ...
🌐
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 ...
Find elsewhere
🌐
JavaScript.info
javascript.info › tutorial › the javascript language › data types
Date and time
There’s a special method Date.now() that returns the current timestamp.
🌐
Templafy
support.templafy.com › hc › en-us › articles › 5128606107293-How-to-format-date-and-time-using-FormatDateTime
How to format date and time using FormatDateTime() – Templafy Help center
Using the FormatDateTime() together with Now() function to insert today's date and format it according to 'dddd d MMMM yyyy' for the 'DocumentLanguage' set in the User Profile.
🌐
Python documentation
docs.python.org › 3 › library › datetime.html
datetime — Basic date and time types
Same as datetime.strftime(). This makes it possible to specify a format string for a datetime object in formatted string literals and when using str.format(). See also strftime() and strptime() behavior and datetime.isoformat(). Examples of working with datetime objects: >>> import datetime as dt >>> # Using datetime.combine() >>> d = dt.date(2005, 7, 14) >>> t = dt.time(12, 30) >>> dt.datetime.combine(d, t) datetime.datetime(2005, 7, 14, 12, 30) >>> # Using datetime.now() >>> dt.datetime.now() datetime.datetime(2007, 12, 6, 16, 29, 43, 79043) # GMT +1 >>> dt.datetime.now(dt.timezone.utc) date
🌐
PHP
php.net › manual › en › function.date.php
PHP: date - Manual
update page now · date_add » · « checkdate · Preface · Function Reference · Date and Time Related Extensions · Date/Time · Date/Time Functions · (PHP 4, PHP 5, PHP 7, PHP 8) date — Format a Unix timestamp · date(string $format, ?int $timestamp = null): string ·
🌐
Make
help.make.com › date-and-time-functions
Date and time functions - Help Center
e g in a search module) spanning the whole previous month as a closed interval (the interval that includes both its limit points), it is necessary to calculate the last day of the month 2019 09 01 ≤ d ≤ 2019 09 30 {{adddays(setdate(now; 1); 1)}} ...
🌐
Adobe
helpx.adobe.com › coldfusion › cfml-reference › coldfusion-functions › functions-c-d › DateFormat.html
DateFormat
December 4, 2025 - <cfscript> // This snippet throws an exception writeOutput("The date is: " & DateFormat('04/10','mm-dd')) </cfscript> ... If you set the above flag as D, the snippet below produces the same output when the mask is set to d. <cfscript> writeOutput(dateformat(now(), "mm-D-yyyy") & "<br/>") ...
🌐
W3Schools
w3schools.com › js › js_date_formats.asp
JavaScript Date Formats
JS Examples JS HTML DOM JS HTML Input JS HTML Objects JS HTML Events JS Browser JS Editor JS Exercises JS Quiz JS Website JS Syllabus JS Study Plan JS Interview Prep JS Bootcamp JS Certificate JS Reference ... The ISO format follows a strict standard in JavaScript. The other formats are not so well defined and might be browser specific. Independent of input format, JavaScript will (by default) output dates in full text string format:
🌐
W3Resource
w3resource.com › javascript-exercises › javascript-basic-exercise-3.php
JavaScript: Display the current date in various format - w3resource
This JavaScript program retrieves the current date and formats it in multiple ways (mm-dd-yyyy, mm/dd/yyyy, dd-mm-yyyy, dd/mm/yyyy). It uses the Date object to get the current day, month, and year, and then adds leading zeros if necessary to ...