set to yesterday

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
This is today, startDate = Format(Today(), "yyyyMMdd")
How can I set startDate to yesterday?
Thanks,
Jim.
 
In C# it will be:
string startDate = DateTime.Now.AddDays(-1).ToString("yyyyMMdd");

In the language you used (maybe VBScript) there must be a DateAdd
function:
DateAdd("d", -1, Now()) is yesterday.

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
 
Back
Top