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!

how many business are left in a month

Status
Not open for further replies.

vblack7770

Programmer
Apr 11, 2005
26
US
I am an experienced crystal user. Developing in CR 8.5 with Oracle ODBC connecting to Orace 9i DB. I am working on the following:

How many business days are in the Month(currendate)?
How many business days are left in the Month(currentdate)?
How many business days have passed in the Month(currentdate)?

Obviously, if I can get two of these, I can use then to calc the third.

 
I think you can adapt Ken Hamady's formula:

You could use the following for the start date:

currentdate - day(currentdate)+1

For the end date, use:

dateadd("m",1,currentdate - day(currentdate) + 1)-1

-LB
 
Returning the # of days between two days is not what I needed. I actually want counts for the following:
How many business days are in the Month(currendate)?
How many business days are left in the Month(currentdate)?
How many business days have passed in the Month(currentdate)?
 
Using the dates I suggested would give you the # of business days for the current month. I assumed you could adapt that. A second formula would use the currentdate for the end date, but would otherwise be the same. Then subtract the second from the first.

-LB
 
Oh!! I figured out what you meant. Thanks loads for the help as usual!!! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top