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
JavaScript Date objects represent a single moment in time in a platform-independent format. Date objects encapsulate an integral number that represents milliseconds since the midnight at the beginning of January 1, 1970, UTC (the 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 could be in yy/dd/mm or yyyy-dd-mm format, or something similar. To tackle this problem, it would be better to create a reusable function so that it can be used across multiple projects.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Date › now
Date.now() - JavaScript | MDN
// This example takes 2 seconds to run const start = Date.now(); console.log("starting timer..."); // Expected output: "starting timer..." setTimeout(() => { const ms = Date.now() - start; console.log(`seconds elapsed = ${Math.floor(ms / 1000)}`); // Expected output: "seconds elapsed = 2" }, 2000);
🌐
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
Custom date and time format strings can be used with both DateTime and DateTimeOffset values. In formatting operations, custom date and time format strings can be used either with the ToString method of a date and time instance or with a method that supports composite formatting.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-date-now-method
JavaScript Date now() Method - GeeksforGeeks
July 11, 2025 - The Date.now() method in JavaScript returns the current timestamp in milliseconds since January 1, 1970.
🌐
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
🌐
IBM
ibm.com › docs › en › cobol-zos › 6.3.0
FORMATTED-CURRENT-DATE
The FORMATTED-CURRENT-DATE function returns a character string that represents the current date and time provided by the system on which the function is evaluated. The content of the returned value is formatted according to the format in the argument.
🌐
PHP
php.net › manual › en › function.date.php
PHP: date - Manual
update page now · PHP 8.4.19 Released! 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 ·
🌐
Excel Forum
excelforum.com › excel-formulas-and-functions › 537287-easy-format-now-as-mm-dd-yyyy.html
EASY: Format NOW as mm/dd/yyyy
> > Something like =formatdate(now();mm/dd/yyyy) > > Thanks! ... That worked out! Thanks a lot!!! ... There are currently 1 users browsing this thread. (0 members and 1 guests) ... All times are GMT -4. The time now is 09:23 AM.
🌐
Make
help.make.com › date-and-time-functions
Date and time functions - Help Center
but its last millisecond 2019 09 01t00 00 00 000z ≤ d ≤ 2019 09 30t23 59 59 999z {{parsedate(parsedate(formatdate(now; "yyyymm01"); "yyyymmdd"; "utc") 1; "x")}} if the result should respect your timezone settings, simply omit the utc argument {{parsedate(parsedate(formatdate(now; "yyyymm01"); "yyyymmdd") 1; "x")}} however, it is preferable to use a half open interval instead (the interval that excludes one of its limit points), specifying the first day of the following month instead and replacing the less or equal than operator with less than 2019 09 01 ≤ d < 2019 10 01 2019 09 01t00 00
🌐
Python documentation
docs.python.org › 3 › library › datetime.html
datetime — Basic date and time types
Return the current local date and time, with tzinfo None. ... See also now(), fromtimestamp().
🌐
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 ...
🌐
JavaScript.info
javascript.info › tutorial › the javascript language › data types
Date and time
The method Date.parse(str) can read a date from a string. The string format should be: YYYY-MM-DDTHH:mm:ss.sssZ, where:
🌐
Day.js
day.js.org › docs › en › display › format
Format · Day.js
dayjs().format() // current date in ISO8601, without fraction seconds e.g.
🌐
MySQL
dev.mysql.com › doc › en › date-and-time-functions.html
MySQL :: MySQL 8.4 Reference Manual :: 14.7 Date and Time Functions
Returns the current date and time as a value in 'YYYY-MM-DD hh:mm:ss' or YYYYMMDDhhmmss format, depending on whether the function is used in string or numeric context. The value is expressed in the session time zone. If the fsp argument is given to specify a fractional seconds precision from ...
🌐
Educative
educative.io › answers › what-is-datenow-in-javascript
What is Date.now() in Javascript?
In Javascript, the .now() method is a Date static method that returns the number of milliseconds since January 1, 1970 00:00:00 UTC.