Home » RDBMS Server » Server Administration » Business Days
Business Days [message #371799] Thu, 07 December 2000 11:09 Go to next message
Alex Amitrano
Messages: 1
Registered: December 2000
Junior Member
Hi,

I'm developing a vacation day tracking application. When an employee enters the range of dates (start and finish) that he/she would like to take off, I need to be able to calculate the number of business days the he/she is requesting. Any idea how to do this?

Thanks,

Alex
Re: Business Days [message #372102 is a reply to message #371799] Wed, 10 January 2001 06:21 Go to previous message
Sandeep Udupa
Messages: 9
Registered: January 2001
Junior Member
I think you can count the number of days from Start Date to the End Date which is a simple arthmetic. After that you calculate the Sunday and Saturday between the start date and end date using where clause as day in 'SUNDAY', 'SATURDAY'

If you have any holidays defined in some table then take this also into consideration.

You will get the total number of days, leaves and the difference between these two is the Total working days.
Previous Topic: Top 100 report
Next Topic: selecting the nth record
Goto Forum:
  


Current Time: Fri May 17 22:57:42 CDT 2024