I am using the date command for a batch script.
I am wondering how to use command date to get yesterday date.
I am using the date command for a batch script. I am wondering how
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Looking at @JRL’s answer… If it’s truly that hard, perhaps use PowerShell and then do similar to Powershell's Get-date: How to get Yesterday at 22:00 in a variable?
You can call to PowerShell in a bat file like so: Use bat to start Powershell script
You’ll end up with a three or four liner solution rather than the 100 or so written (immaculately I’ll add) by Rob Van der Woude.
Good luck…