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!

Reporting on Specific Dates

Status
Not open for further replies.

kahddi

MIS
Sep 10, 2004
1
US
I want to add a formula in Crystal Reports that will only look at Saturday and Sunday from a starting date forward

This is the code I currently am using, but It doesn't seem to be working:

{Help_Desk.Open Date & Time} >= Date (2004, 08, 01) and
{Help_Desk.Open Time} > "17:00:00" and
DayOfWeek(CurrentDate) =1 and DayOfWeek(CurrentDate) =7

Any help that you can give is appreciated.

K.
 
Why are you testing for currentdate? And a date can't be both Saturday and Sunday, you should use an OR

(
{Help_Desk.Open Date & Time} >= Date (2004, 08, 01)
)
and
(
{Help_Desk.Open Time} > "17:00:00" and
)
and
(
DayOfWeek({Help_Desk.Open Date & Time}) in [1,7]
)

I assume that the above will work in your version of Crystal, if it doesn't try posting technical information, which should be included with every post.

-k
 
Dear Kahdi,

It appears that you are using an old version of MagicTSD. (The Help Desk viewname was changed to Incident at version 7.2 of MagicTSD).

Are you on Crystal 8.0 or on an even earlier version? It makes a difference as to the optimal formula. Also, you are aware that the Help Desk.Open Time is a text field, correct? I wouldn't compare on that.

From what your example formula is stating, it seems you want to return calls that were opened after 5:00 p.m. on Saturday or after 5:00 p.m. on Sunday. Is that correct?

Please repost stating:

Crystal Version
Magic Version
Report Logic - What it is that you want returned.

Regards,

ro

Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top