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!

XI - formula question

Status
Not open for further replies.

campia

Technical User
Apr 20, 2007
77
BE
Hi,

To find out how many days I needed to solve my ticket, I use this formula:

Select Case DateDiff("d",{Object.Creation Date}, {Object.Solved Date})
Case 0
formula="Same Day"
Case 1 to 5
formula="1day-5days"
Case 5 to 10
formula="5days-10days"
Case 10 to 15
formula="10days-15days"
Case 15 to 20
formula="15days-20days"
Case Else
formula="over 20days"
End select

How can I avoid to count Saturday and Sunday too?

andré
 
use the function dayofweek(datefield) it will return 1 and 7 for sunday and saturday. You can then exclude these form your formulae.

Ian
 
excuse me but where exactely should I put this formula, inside the "select"?
 
I changed my formula:
Select Case (DateDiff("d",{Object.Creation Date}, {Object.Solved Date}) - DateDiff("ww",{Object.Creation Date}, {Object.Solved Date},crSaturday)- DateDiff("ww",{Object.Creation Date}, {Object.Solved Date},crSunday))

and it works.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top