ISO week number in CMD

前端 未结 3 1364
攒了一身酷
攒了一身酷 2020-12-10 17:23

How can I determine the (ISO 8601) week number in a Windows batch file?

Unfortunately WMIC PATH WIN32_LOCALTIME GET /FORMAT:LIST only has WeekInMont

3条回答
  •  -上瘾入骨i
    2020-12-10 17:49

    Try this in a batch file:

    @For /F %%I In ('PowerShell Get-Date -UFormat %%V') Do @Echo(%%I
    @Timeout -1
    

    or in the command prompt window:

    For /F %I In ('PowerShell Get-Date -UFormat %V') Do @Echo(%I
    

提交回复
热议问题