Posted On 2007-01-01 by FortyPoundHead
Keywords: Command Reference
Tags: Windows Commandline Windows
Views: 1619

Display or change the date


to display the date


to set the system date




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 are as follows:

Country or languageCountryCodeDate formatTime format
United States00101/23/19975:35:00.00p
Czechoslovakia04223.01.1997 17:35:00
France03323.01.1997 17:35:00
Germany04923.01.1997 17:35:00
Latin America00323/01/19975:35:00.00p
International English06123/01/1997 17:35:00.00
Portugal35123-01-1997 17:35:00
Switzerland04123.01.97 17 35.00
Norway04723.01.97 17:35:00
Belgium03223/01/97 17:35:00
Brazil05523/01/97 17:35:00
Italy03923/01/97 17.35.00
United Kingdom04423/01/97 17:35:00.00
Denmark04523-01-97 17.35.00
Netherlands03123-01-97 17:35:00
Hungary0361997.01.23 17:35:00
Canadian-French0021997-01-23 17:35:00
Poland0481997-01-23 17:35:00
Sweden0461997-01-23 17.35.00

Date Formatting

In Control Panel Regional settings a short date STYLE can be set. This can be used to change the date separator, the order (e.g. dd/mm/yyyy or mm/dd/yyyy) and the number of characters used to display days and months.

Date Format information in the registry

The Country Code is a setting in the registry. This can be read using REG.exe as follows

Note: following command is all on one line:

FOR /F "TOKENS=3 delims= " %%G IN ('REG QUERY "HKEY_CURRENT_USER\Control Panel\International\iCountry"') DO (SET v_country=%%G)

The date separator is also a registry setting. This can be read using REG.exe as follows

Note: following command is all on one line:

FOR /F "TOKENS=3 delims= " %%G IN ('REG QUERY "HKEY_CURRENT_USER\Control Panel\International\sDate"') DO SET v_date_sep=%%G

If Command Extensions are disabled DATE will not support the /T switch

About the Author

FortyPoundHead has posted a total of 1974 articles.


Comments On This Post

No comments on this post yet!

Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.

Your IP address is:

Before you can post, you need to prove you are human. If you log in, this test goes away.

Recent Forum Posts

Advanced search added
dwirch posted on September 23, 2017 at about 13:44 in Site News

Job Spammer: Gaurav Mehta - AgreeYa Solutions
dwirch posted on September 22, 2017 at about 10:35 in Spammers

Job Spammer: Prutha Siri - Javelin Systems
dwirch posted on September 10, 2017 at about 6:15 in Spammers

New security implemented
dwirch posted on September 7, 2017 at about 7:16 in Site News

Malicious IP Checker Companion Tool
dwirch posted on August 12, 2017 at about 20:24 in Site News

Job Spammer: Steve Adams
dwirch posted on August 8, 2017 at about 7:44 in Spammers