Skip to Content
author's profile photo Former Member
Former Member

Take Bank Holidays out

Dear all,

how can I count for Bank holidays when counting number of working days under my formula?

I have "Number of days" category in my report and I would like to count only working days, that is Monday to Friday (➖ Weekends and Bank holidays).

I can take the weekends off by using "dayofweek" formula but how can you actually take Bank holidays out?

Using Formula:

if {order_header.order_status}>= 77 then
if dayofweek({order_header.act_despatch})<9 then
1
else
2;
if dayofweek({order_header.act_despatch}) <= 8 then
totext(dayofweek({order_header.act_despatch}),0,'')
else
"9+";

many thanks

Regards

Jehanzeb

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2008 at 03:40 PM

    I think the only way to go about this would be to create another formula specifying the bank holidays and then to have the original formula substract them out if they fall during a weekday.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 21, 2008 at 03:42 PM

    Jehanzeb,

    There was an additional UFl available, U2LCOM.dll I believe, that would read a text file of holidays.

    However I found that assigning Holidays to a date array to be just as easy.

    You could even create a custom function in CR9 and above that would check if a date was equal to a list of Holidays.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2008 at 07:22 PM

    sub select in report query:

    (select count(table.date) from table where table.date in [#12/25/Year(CurrentDate), #01/01/Year(CurrentDate#, etc]) As BankHolidays

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 05, 2008 at 11:56 AM

    don't know where this thread is going! so closing!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.