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!

Number of working days in a month ?

Status
Not open for further replies.

ronche

IS-IT--Management
Apr 9, 2002
2
FR
Hello,

Is there anybody who can give me the expression or function in order to calculate the number of working days in a month (number of days of the month excluding saturday and sunday).
If we can exclude the public holidays in France within the expression, it would be perfect.

I work with cognos impromptu 6.0

Thanks for your assistance.

Regards

Ronan CHENAIS
THALES NAVIGATION SA
France
 
Hi Ronche
There is no function which will return working days from month. You need to create a table in database with marking the working days and use it for reporting needs. This table can be populated well in advance for whole year if the company schedule is known in upfront which is the general case or populate on monthly basis before the start of the month.

Regards
Uma Mahesh
 
Ronche,
Uma is correct in practical terms - the variation in public holidays between countries requires a user-created table on the DB, with all the maintenance issues that entails.

You could generate something workable that ignored public holidays by using datediff plus integer-divide and weekday functions to provide a count of weekdays. If such proved acceptable, you might be able to add it as a user-defined function (if Cog Imp6 provides the same functionality as Imp7).

I recall seeing a couple of user defined functions in Crystal Reports which calculated Easter and public holidays (using lookup table within the function) that were called by a further UDF to provide true working days between two dates. Perhaps that's still part of Crystal

lex

soi la, soi carré
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top