批处理cmd脚本设置日期时,取月初前一天时间无法取到月末时间.

2024-12-02 15:44:26
推荐回答(1个)
回答(1):

@echo off
echo Wscript.echo dateadd("d",-1,date)>vbs.vbs
set day=
for /f %%a in ('cscript //nologo vbs.vbs') do del vbs.vbs&&set day=%day% %%a
echo %day%
pause