venkatesh p n


hi Everyone,

I have one query, i want to calculate the business working hours (like from monday to friday 9 to 5 pm and saturday 9 to 2 pm) for the given dates. And also i want to eliminate the public holidays with in the given dates.



If any one was faced the same situation plz help me.




Regards

Venki



Re: want to calculate business hours

Arnie Rowland


Solving this problem will be easier if you use a Calendar table.

See these articles for more information and suggestions:

Datetime -Calendar Table
http://www.aspfaq.com/show.asp id=2519

Datetime -How to count the number of business days
http://www.aspfaq.com/show.asp id=2453







Re: want to calculate business hours

venkatesh p n

Could you please explain me the structure of the calendar table. where to store business hours (i.e., 9 to 5 pm), where to store sunday and holidays.

please help me.

Thanks in advance.

Regards
Venki







Re: want to calculate business hours

Arnie Rowland

Teh structure is very well documented in the articles provided.

There is a column named [IsWeekDay].

You 'could', I suppose, do the opposite and create a column named [IsHoliday] instead.

You could add business hours, or an indicator when business hours deviate from the norm...

The idea is to create a 'Calendar' table that solves your problems.