The code below shows how to format date and time stamps in DOS batch files. This is very useful if you are creating a log file, or any file that should have a unique file name.
If you run the batch file below it should print something like the following output:
Today's date is 2009_10_21 The local time is 14_25_01 Date and time: 2009_10_21_14_25_01
You need to login to post a comment.