how to set date to current date using dos batch file command

前端 未结 4 1942
忘了有多久
忘了有多久 2021-02-11 00:36

how to set date to current date using dos batch file command.

4条回答
  •  情话喂你
    2021-02-11 00:38

    The date command is what you are looking for. This works on my Windows XP box:

    date 15-02-2010
    

    Notice the formatting dd-MM-yyyy, which seems to be required here, probably because of my regional settings being set to Denmark. The documentation states that the format is MM-dd-yy, but on my computer, the day and month fields gets flipped if the date is written in that format.

提交回复
热议问题