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

How to write formula that include Friday, Saturday, Sunday

Status
Not open for further replies.

tumap

Technical User
Aug 14, 2001
4
US
Hello
I am stuck big time. If anyone find the answer, I am very appreciated. I have to write up a report that show the data in the last 24 hours. It is easy, all I have to do is write "{Data.field}=CurrentDate-1". Now here the problem, if the date fall on Monday, how to write formula that included Friday, Saturday, and Sunday? Thanks
This is the formula:
If DayofWeek(CurrentDate) in [5] then
{Data.Field} <> &quot;Closed&quot; and
{Date.Field} = (CurrentDate - 1)
Else
{Data.Field} <> &quot;Closed&quot; and
{Date.Field} = CurrentDate
 
How about:
{Date.Field} in (CurrentDate - 1) to (CurrentDate - 3) Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top