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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pull previous day data

Status
Not open for further replies.

ptrifile

Technical User
Aug 10, 2004
457
US
I have a date time formatted field and currently i use a parameter field to do a date range. I would like to have a formula in the select expert to always run the report with the previous days data from the current date. So if i ran the report today it would just run the report for 11/10/2009 without having to actually choose the date.

Is there an easy way to accomplish this with a date time field?

Paul
 
{table.date} = currentdate-1

If you have to accommodate weekends, then try:

(
(
dayofweek(currentdate) = 1 and
{table.date} = currentdate-3
) or
(
dayofweek(currentdate) <> 1 and
{table.date} = currentdate-1
)
)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top