Monday, January 11, 2010

Format Date String in DOS batch file

To format date in DOS batch file I used the following syntax,

echo %date:~8,2%%date:~3,2%%date:~0,2%

which output 100111 for 11th January 2010.

No comments: