i am making a bat file that does a few tasks for me but i need to get the current date in MMDDYY format.
I know this will return the 4 digit year but how can i make it show 12 instead of 2012?
for /f “tokens=2-4 delims=/ ” %%a in (‘date /T’) do set year=%%c
set MMDDYY=%DATE:~4,2%%DATE:~7,2%%DATE:~12,2%check the return from
echo %DATE%to see if you need to make adjustment for locale