In case you need to generate a file with the date in the filename in Windows
I just had the pleasure to do exactly that in a batch file. Some poking around technet gave me the following:
%date:~-4,4%%date:~4,2%%date:~-7,2%
This will create an ISO-style date format out of a date in US locale settings.