How do I name the output textfile to YYYYMMDD based on the system date?
sqlcmd -S DataBBB -i c:\scripts\followup.sql
-o %DATE:~4,2%_%DATE:~7,2%_%DATE:~-4%.txt -s ; -W -u
Now the output text file is 01_31_2012.txt
.
How can I change it to 2012_01_31.txt
?