如何用DOS命令的date命令获得当前日期的前一天
2个回答
展开全部
@echo off
set DaysAgo=1
set Today=%date:~0,4%%date:~5,2%%date:~8,2%
set /a PassDays=%Today%-1
echo %PassDays%
pause
set DaysAgo=1
set Today=%date:~0,4%%date:~5,2%%date:~8,2%
set /a PassDays=%Today%-1
echo %PassDays%
pause
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
引用guowenlong72的回答:
@echo off
set DaysAgo=1
set Today=%date:~0,4%%date:~5,2%%date:~8,2%
set /a PassDays=%Today%-1
echo %PassDays%
pause
@echo off
set DaysAgo=1
set Today=%date:~0,4%%date:~5,2%%date:~8,2%
set /a PassDays=%Today%-1
echo %PassDays%
pause
展开全部
跨月或者跨年楼上就知道这方法有多坑
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询