Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing %DATE% format

Status
Not open for further replies.

AntiEarnie

Technical User
May 2, 2002
215
US
Does anyone know where to change the %DATE% environment variable? I know short date appears to change the date part but windows keeps putting in the abbreviated day of week.

For example:
echo %DATE%
from the command prompt gives me:
Wed 01/05/2005

I would like to find a way stop windows from returning the "Wed".
 
In regional options change the short date format to mm/dd/yyyy.
 
While that does change the order the date is listed in it still also posts the the day in front, i.e. Mon, Tue, Wed, etc...
 
works on my machine (mind you, I'm UK based, so UK settings) - are you sure you don't have ddd mm/dd/yyyy. I played a little with this. Got the same as you if I put ddd in front of the rest of the date - without ddd, text day doesn't appear when echoing %date%. If its not working for you, must be some other factor involved (I'm no expert on this - though have played a bit as M$ o/s have this habit of insisting on US settings - you have to work very hard to remove US settings from machine, if you don't want them. Btw - why is US the only place that doesn't have its date in logical order? Month back to day then forward 2 orders of magnitude to year? Everyone else has either day month year or year month day. Sorry - just an aside, always bugs me!)
 
Rob VanderWoude notes:
However, keep in mind that Microsoft has made some changes in the output of the DATE /T and TIME /T commands, depending on the Regional Settings used.
In the Canadian English version of XP for example, DATE /T does not return the Day Of Week, only MM/DD/YY.

Some batch techniques that may help:
 
Rob VanderWoude notes:
However, keep in mind that Microsoft has made some changes in the output of the DATE /T and TIME /T commands, depending on the Regional Settings used.
In the Canadian English version of XP for example, DATE /T does not return the Day Of Week, only MM/DD/YY.

Some batch techniques that may help:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top