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

Printing Friday's Data on Monday

Status
Not open for further replies.

NattyCat

MIS
Aug 9, 2004
38
GB
Hi,

I have a report which is restricted to

{transaction date} = current date -1

However, on Monday, I need it to show the previous Friday's data, not Sunday's.

Ideas please?

Thanks.


 
I had the same problem.

Here's what I did. I made a copy of the report with

{transaction date} = current date - 3

That you run on Monday's only


Why? If I used a formula to determine dates, then the dates did not appear in Database-Show SQL Query and depending on the size of your tables, it would really slow the process down. In my case, it involved close to a million records.

Cheers,

-LW
 
I figured this one out, and I used:

(if dayofweek(currentdate) = 2
then {ReconciliationStatementTbl.CreateDate} = currentdate -3
else {ReconciliationStatementTbl.CreateDate} = currentdate -1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top