Home > Commands A-M > Commands Da-Dr


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

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).

mm-dd-yy (v1.0 Win95 NT3.5)
Sets the date you specify. Values for day, month, and year must be separated by periods (.), hyphens (-), or slash marks (/). The date format depends on the COUNTRY setting you are using in your CONFIG.SYS file. The list shows the valid values for the month, day, and year portions of the mm-dd-yy parameter.

/? (NTXP)
Display help.
/T (NT4)
Tells the command to just output the current date, without prompting for a new date.


For information about changing the current time, see the TIME command.
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

Adjusting for days in a month

The operating system is programmed to change months and years correctly, whether the month has 28, 29, 30, or 31 days.

Using the DATE command in your AUTOEXEC.BAT file

To prompt users for the date every time the computer is restarted, include the DATE command in your AUTOEXEC.BAT file.

Changing the date format

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).

Date formats for different country codes

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

Modifying computer system clock

Prior to v3.30, DATE did not modify the computer system clock (You had to use SETUP disk).





v1.0 v1.05
v1.1 v1.11 v1.24 v1.25 v1.85 v2.0 v2.01 v2.05 v2.10 v2.11 v2.11R v2.12 v2.2 v2.25 v3.0 v3.20 v3.05 v3.1 v3.21 v3.25 v3.30 v3.3A v3.3R v3.3T v3.31 v3.40 v4.0 v4.01 v4.01A v5.0 v5.0A v5.00.02 v5.001A v5.01 v5.02 v6.0 v6.10 v6.2 v6.21 v6.22 v6.23 v7.00 v7.0R1 v7.10 v8.00
Win95 Win98 WinME
Windows NT
NT3.5 NT4 NT2000 NTXP NT2003