|Purpose:||Display and optionally change the system date|
|Format:||DATE [/Fn /T /U "format"] [mm -dd -yy ]|
|mm||The month (1 - 12)|
|dd||The day (1 - 31)|
|yy||The year (80 - 99 or a 4- digit year)|
|"..."||Date display format|
See also: TIME.
If you simply type DATE without any parameters, you will see the current system date and time, and be prompted for a new date. Press Enter if you don't wish to change the date. If you type a new date, it will become the current system date, which is included in the directory entry for each file as it is created or altered:
Wed 16/06/2021 10:40:36a
New date (mm-dd-[yy]yy):
You can also enter a new system date by typing the DATE command plus the new date on the command line:
You can use hyphens, slashes, or periods to separate the month, day, and year entries. The year can be entered as a 2-digit or 4-digit value. Two-digit years between 80 and 99 are interpreted as 1980 - 1999; values between 00 and 79 are interpreted as 2000 - 2079.
DATE adjusts the format it expects depending on your country settings. When entering the date, use the correct format for the country setting currently in effect on your system.
You can also use the international date format yyyy-mm-dd.
The day of week and month are translated into your local language (English, French, German, Italian, Russian, and Spanish).
|"..."||Custom date / time format to use when displaying the current date. The formatting characters are the same as used by the @DATEFMT function.|
0 : Tue Jan 1, 2019
1 : 1/01/19
2 : Tue 1/01/2019
4 : 2019-01-01
|/T||Displays the current date but does not prompt you for a new date. If a new date is specified in the same command as /T the new date will be ignored.|