Displays the date and prompts you to change the date, if necessary.
The operating system records the current date for each file you create or change; this date is listed next to the filename in the directory.
DATE [mm-dd-yy] [/T]
Display current date and prompt for new date:
(Note: Press ENTER at the prompt to keep the same date).
For information about changing the current time, see the
NOW - Display Message with Current Date and Time
NET TIME - Display the Date in US Format (mm-dd-yy)
REG - Read, Set or Delete registry keys and values
TIME - Display or set the system time
TOUCH - Change file timestamps
Equivalent Linux BASH commands:
cal - Display a calendar
date - Display or change the date
time - Measure Program Resource Use
times - User and system times
touch - Change file timestamps
The operating system is programmed to change months and years correctly, whether the month has 28, 29, 30, or 31 days.
To prompt users for the date every time the computer is restarted, include the DATE command in your AUTOEXEC.BAT file.
To display the date in other format besides mm-dd-yy, add the COUNTRY command to your CONFIG.SYS file. You can change the date format to the European standard format (dd-mm-yy) or to the Scientific International (Metric) format (yy-mm-dd).
A typical output from DATE /T is "Mon 11/09/2000" but this is dependent on the country code. The date formats for different country codes:
Country or language CountryCode Date format Time format United States 001 01/23/1997 5:35:00.00p Czechoslovakia 042 23.01.1997 17:35:00 France 033 23.01.1997 17:35:00 Germany 049 23.01.1997 17:35:00 Latin America 003 23/01/1997 5:35:00.00p International English 061 23/01/1997 17:35:00.00 Portugal 351 23-01-1997 17:35:00 Finland 358 23.1.1997 17.35.00 Switzerland 041 23.01.97 17 35.00 Norway 047 23.01.97 17:35:00 Belgium 032 23/01/97 17:35:00 Brazil 055 23/01/97 17:35:00 Italy 039 23/01/97 17.35.00 United Kingdom 044 23/01/97 17:35:00.00 Denmark 045 23-01-97 17.35.00 Netherlands 031 23-01-97 17:35:00 Spain 034 3/12/98 17:35:00 Hungary 036 1997.01.23 17:35:00 Canadian-French 002 1997-01-23 17:35:00 Poland 048 1997-01-23 17:35:00 Sweden 046 1997-01-23 17.35.00 Country or language CountryCode Date format Time format
Prior to v3.30, DATE did not modify the computer system clock (You had to use SETUP disk).