Greetings,
I am attempting to determine yesterday's date with the code below. %YDAY% is coming back as 6, today is the 8th so I am expecting 7. I am going buggy trying to figure this out. Open to easier methods as well if there are any.
@echo off
echo WScript.Echo Day(Datepart("d",Now-1))>tmp.vbs
for /f "delims=" %%a in ('cscript /nologo tmp.vbs') do set YDAY=%%a
del /q tmp.vbs
echo Yesterday was %YDAY%
Thank you in advance for your assistance.
KWJ1027
I am attempting to determine yesterday's date with the code below. %YDAY% is coming back as 6, today is the 8th so I am expecting 7. I am going buggy trying to figure this out. Open to easier methods as well if there are any.
@echo off
echo WScript.Echo Day(Datepart("d",Now-1))>tmp.vbs
for /f "delims=" %%a in ('cscript /nologo tmp.vbs') do set YDAY=%%a
del /q tmp.vbs
echo Yesterday was %YDAY%
Thank you in advance for your assistance.
KWJ1027