I have a batch file which creates a backup of some source code folders when run. For back file name it creates a string consisting of current date time.
To get date time string following snippet is used.
SET isodt=%date:~-4%_%date:~3,2%_%date:~0,2%__%time:~0,2%_%time:~3,2%_%time:~6,2%
echo %isodt%
pause
It gives following output when run on my laptop:
2019_09_12__14_25_01
Recently I ran it on a virtual machine and it gave me following output for same code.
2019_ 0_Th__14_18_18
Why is output not the same? Both are run on Windows 10 64 bit machines.