Date - Display or change date - Windows CMD
Display or change the date.
Syntax
To display the date:
DATE /T
To set the system date:
DATE
or
DATE date_today
The default output from DATE /T in the United States is "mm/dd/yyyy", e.g. "1/17/2032" but this varies by country/locale.
The default short date and time formats for a selection of countries are as follows:
| Country/language | CountryCode | Locale | Date_format | Time_format |
|---|---|---|---|---|
| Argentina-Spanish | 054 | 2C0A | 17/01/2032 | 9:45:30 pm |
| Australia | 061 | 0C09 | 17/01/2032 | 9:45:30 PM |
| Austria | 043 | 0C07 | 17.01.2032 | 09:45:30 |
| Brazil-Portuguese | 055 | 0416 | 17/01/2032 | 09:45:30 |
| Belgium-French | 032 | 080C | 17/01/2032 | 09:45:30 |
| Belgium-Dutch | 032 | 0813 | 17/01/2032 | 9:45:30 |
| Canada-French | 002 | 0C0C | 2032-01-17 | 09:45:30 |
| Canada-English | 002 | 1009 | 01/17/2032 | 9:45:30 PM |
| China/PRC-Chinese | 086 | 0804 | 2032/1/17 | 9:45:30 |
| China/HK-Chinese Trad | 852 | 0C04 | 17/1/2032 | 9:45:30 |
| Czech Republic | 042 | 0405 | 17.1.2032 | 9:45:30 |
| Denmark | 045 | 0406 | 17-01-2032 | 09.45.30 |
| Finland | 358 | 040B | 17.1.2032 | 9:45:00 |
| France | 033 | 040C | 17/01/2032 | 09:45:30 |
| Germany | 049 | 0407 | 17.01.2032 | 09:45:30 |
| Greece | 030 | 0408 | 17/01/2032 | 9:45:30 μμ |
| Hungary | 036 | 040E | 2032.01.17. | 9:45:30 |
| India-Hindi | 091 | 0439 | 17-01-2032 | 09:45:30 |
| India-Bengali | 091 | 0445 | 17-01-32 | 09.35.00 |
| India-Telugu | 091 | 044A | 17-01-32 | 09:45:30 |
| Italy | 039 | 0410 | 17/01/2032 | 09.45.30 |
| Japan | 081 | 0411 | 2032/01/17 | 9:45:30 |
| Netherlands | 031 | 0413 | 17-01-2032 | 9:45:30 |
| Norway | 047 | 0414 | 17.01.2032 | 09:45:30 |
| Poland | 048 | 0415 | 2032-01-17 | 09:45:30 |
| Portugal | 351 | 0816 | 17-01-2032 | 09:45:30 |
| Spain | 034 | 0C0A | 17/01/2032 | 9:45:30 |
| Sweden | 046 | 041D | 2032-01-17 | 09.45.30 |
| Switzerland-French | 041 | 100C | 17.01.2032 | 09:45:30 |
| Switzerland-German | 041 | 0807 | 17.01.2032 | 09:45:30 |
| Switzerland-Italian | 041 | 0810 | 17.01.2032 | 09:45:30 |
| United Kingdom | 044 | 0809 | 17/01/2032 | 09:45:30 |
| United States | 001 | 0409 | 1/17/2032 | 9:45:30 PM |
Bold = 24 hour time
Prior to the year 2000, the default short date format for many countries used a 2 digit year.
Other date and time formats
The dates and time above are only default settings, in the Control Panel users can change the date and time format including the date separator, 12/24 hour time and leading/trailing characters. Take care not make cultural assumptions about the users chosen date or time format.
The ISO standard 8601 defines a date and time format that can be used internationally: YYYY-MM-DD to avoid the confusion that is often caused by differences in language and local custom. ISO 8601 also recommends that 24 hour times have a leading zero (09:45), but not all countries follow this convention.
Errorlevels
If the Date was successfully changed (or not given) %ERRORLEVEL% = 0
If the user lacks admin privileges = 1
Date Formats in the registry
Short Date Format
HKCU\Control Panel\International\sShortDateDate Separator
HKCU\Control Panel\International\sDateCountry Code
HKCU\Control Panel\International\iCountryLocale
HKCU\Control Panel\International\Locale
DATE is an internal command. In early versions of Windows, disabling Command Extensions will disable the /T switch.
“Carpe Diem - Seize the day” ~ Horace
Related commands
%DATE% - variable containing current Date.
GetDate.cmd - Get todays Date (any region, any OS)
datetime.vbs - Get Date, Time and daylight savings (VB Script).
GetLocale - VBScript.
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.
National Language Support Reference.
PowerShell: Get-Date -format s - Get the date in ISO 8601 standard format.
PowerShell: Set-ADUser -Country - Change a users Country Code and other settings.
PowerShell: Set-Date - Change the computer system time.
Equivalent bash command (Linux): date - Display or change the date.
Copyright © 1999-2026 SS64.com
Some rights reserved