DATE – Windows CMD Command

Display or change the date.

The table above is based on Vista/Windows 7, in earlier versions of Windows, the default short date format for most countries returns 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 to make cultural assumptions about the user’s 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 customs. ISO 8601 also recommends that 24 hour times have a leading zero (09:45), but not all countries follow this convention.


If the Date was successfully changed (or not given) %ERRORLEVEL% = 0
If the user lacks admin privileges = 1

DATE is an internal command. If Command Extensions are disabled DATE will not support the /T switch

You may also like...

2 Responses

  1. zoritoler imol says:

    I was very pleased to find this web-site.I wanted to thanks for your time for this wonderful read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you blog post.

  2. zoritoler imol says:

    obviously like your web-site however you have to test the spelling on several of your posts. A number of them are rife with spelling issues and I in finding it very troublesome to inform the reality however I?¦ll certainly come again again.

Leave a Reply

Your email address will not be published. Required fields are marked *