How do I include the date in a Windows Batch file?

How do I include the date in a Windows Batch file?

I have used this many time in Windows batch files.You can set any variable, in my example below called "thedate" to a substring of the computers date to produce only the numbers without any "/" in case this needs to be used in creating folder or file...

Close