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

calculating next business day

Status
Not open for further replies.

jnujella

Programmer
Feb 15, 2007
15
US
Hi all,

I have a situation to clacuate the next Nth business date for the given date.(It has just exclude the sunday and saturday)
I have to acheive it in crystal report 9.0
If any one have idea please let me know

Thanks in advance
 
Try:

if dayofweek(currentdate) in 1 to 5 then
currentdate+1
else
currentdate+(9-dayofweek(currentdate))

-k
 
THanks for the reply

I need a formulat which will ccalculate the next 10 th business date for a given date( suppose orders.orderdate).
By business day I mean any week day except saturday and sunday.

Thanks in advance
 
What's the the next 10 th business date. If it's ten days ahead, you should be able to adapt synapsevampire's formula?

If you mean the 10th of the month, DatePart can find the day of the month and DateAdd can add a whole month if you are past the 10th for the current month.

It's also a good idea to use trial-and-error to get a Crystal solution - it can be set to return small volumes of data and you can work towards the correct formula.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top