
Windows Command Batch Scripting - Create a date string of format YYYYMMDD
Thursday, December 28th, 2006
Below is the code to do this. I was frustrated at not being able to find a quick answer on this so hopefully this will help someone.
set today=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%
Below is the code to do this. I was frustrated at not being able to find a quick answer on this so hopefully this will help someone.
set today=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%
