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!

Formula that will pick data from a particular day of the week

Status
Not open for further replies.

mjm19

Technical User
Apr 22, 2003
33
US
This should be easy, but I'm stumped. Using Crystal 7.5, need to access our Cache' database, and only get certain tests (this is a Hospital) that were collected on the previous 4 Saturdays and Sunday's only. I can get them all for the previous month but how do I set up a formula to only get those from these 2 days from the entire month ??

Thanks for the help.
 
Record Selection Formula

({Table.DATE} >= (CurrentDate - 31)) and
(DayOfWeek ({Table.DATE}) = 1 OR DayOfWeek ({Table.DATE}) = 7)


Update the formula to include your {Table.Field} name.
 
I think you could use something like:

{table.testdate} in dateadd("ww",-4,currentdate) to currentdate and dayofweek({table.testdate}) in [1,7]

-LB


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top