How to get a UNIVERSAL Windows batch file timestamp

前端 未结 5 1717
独厮守ぢ
独厮守ぢ 2021-01-12 03:45

I\'m having trouble generating a timestamp in a Windows batch file, because I get diferent date formats on different Windows versions.

My machine:

&g         


        
5条回答
  •  醉酒成梦
    2021-01-12 04:31

    You don't need VBScript. You can do it with something like this:

    echo %date:~-10,2%/%date:~-7,2%/%date:~-4,4%
    

    Source

提交回复
热议问题