- @echo off
- >"%temp%\DstDate.vbs" echo strLastDate=DateAdd("d", -DatePart("d", Date), Date)
- >>"%temp%\DstDate.vbs" echo strFmtDate=Right(Year(strLastDate),4) ^& Right("0" ^& Month(strLastDate),2) ^& Right("0" ^& Day(strLastDate),2)
- >>"%temp%\DstDate.vbs" echo WScript.Echo strFmtDate
- for /f %%a in ('cscript /nologo "%temp%\DstDate.vbs"') do (
- set "lastEndDay=%%a"
- )
- set lastEndDay=%lastEndDay:~0,4%-%lastEndDay:~4,2%-%lastEndDay:~6,2%
- echo,%lastEndDay%
复制代码
|