Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying yesterday's date - Report Studio 1

Status
Not open for further replies.

elsolo21

Programmer
Apr 7, 2008
26
0
0
US
This seems like it should be really easy. How do I display yesterday's date on a report? Right now, I have it as 'Today()' but the data is really as of yesterday.

thanks,
-Eric
 
_add_days(date,-1) or getdate()-1 for SQL server


Ties Blom

 
Ties,

I thought that would be the obvious command but I get "Parsing error on or around position 14 in the expression: "_add_days(date,-1) "" I don't see a typo in there. The getdate command is not recognized. Any other thoughts?
 
I got it using "_add_days(date2timestamp(today()),-1)"

There may be an easier way but at least this works.

thanks,
-Eric
 
Getdate() should work if you are on SQL Server and have included the function set in the package.
To be honest we have seen some pretty strange (= inconsistent) behavior with database native functions.

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top