Get the App
SLTechnology News&Howtos  ›  Development  › 

The bat script implementation gets the month information specified a few months ago.

Shulou Source: shulou.com Published: 2022-06-03 17:41:27 10月03日 Update

This article mainly explains the "bat script to achieve access to specified months before the month information", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "bat script implementation to get the month information specified a few months ago"!

@ echo offrem specifies months ago set MonthsAgo=2 > "% temp%/DateCalculate.vbs" echo strLastDate=DateAdd ("m", -% MonthsAgo%, Date) > > "% temp%/DateCalculate.vbs" echo strFmtDate=Right (Year (strLastDate), 4) ^ & Right ("0" ^ & Month (strLastDate)) 2) ^ & "01" > > "% temp%/DateCalculate.vbs" echo WScript.Echo strFmtDatefor / f% an in ('cscript / nologo "% temp%/DateCalculate.vbs"') do (set "DstDate=%%a") set DstDate=%DstDate:~0,4%%DstDate:~4,2%echo,%DstDate%pause thank you for your reading The above is the content of "bat script implementation gets the month information specified a few months ago". After the study of this article, I believe you have a deeper understanding of the problem of bat script implementation obtaining the month information specified a few months ago, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Information months scripts learning content that is ideas situations articles more knowledge knowledge points articles follow questions practice push research verification Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Xiaomi MariaDB Shulou Information OPPO Reno