Hi

I have the following in a batch file and am trying to capture yesterdays date but its not capturing any leads will be helpful

----@echo off
set curndate=%date% -1
set curndate1=%curndate:~4,2%
set curndate2=%curndate:~7,2% 
set curndate3=%curndate:~10,4%
set curndate5=%curndate2-1%
set curtime=%time:~0,2%
set curndate4=%curndate2%-%curndate1%-%curndate3%

C:\Oracle\Middleware\asinst_1\config\reports\bin\rwrun userid=sales/sales@orcl report=C:\E1\sales\REPORTS\inv_summ_cust.rdf destype=file desformat=pdf from_date=%curndate4% to_date=%curndate4% desname=C:\Ebiz1\Automail\salesreg.pdf


Kind Regards
Eunice Waweru