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

Current Full Week

Status
Not open for further replies.

aproddut

Programmer
Oct 29, 2002
15
US
Hello,
I am using Crystal 7.0 . Can anyone tell me how do i write th report selection criteria so it gets data only for the current full week (starting from sunday until now)

Thanks,
Ash
 
Here is one way:
{date.field}>=(currentdate-dayofweek(currentdate)+1)

"why it works"
If today were Thursday the 24th of July, it's day of week is 5. The formula subtracts 5 day resulting in Saturday the 19th then adds on to make it Sunday the 20th (this week)

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top