By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,945 Members | 1,432 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,945 IT Pros & Developers. It's quick & easy.

Calculating work hours

P: n/a
Dan
I'm trying to calculate the total work hours between a start and end
date, and also working out an end date by adding a number of work
hours to a start date. Can anyone recommend a decent formula or
function that could do this?

For example, my working day starts at 09:00 til 17:30, with a lunch
break between 12:00 - 13:00. I work Monday to Friday.

How many working hours are there between 1st Oct 2007 15:00 to 4th
October 2007 11:30?

Also, what end date would i get if i added 35 working hours to the 1st
Oct 2007 15:00?

Anybody got any suggestions how i can calculate these values the most
efficiently?

Thanks in advance.

Dan

Oct 10 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Dan" <da**********@newcross-nursing.comschrieb
I'm trying to calculate the total work hours between a start and end
date, and also working out an end date by adding a number of work
hours to a start date. Can anyone recommend a decent formula or
function that could do this?

For example, my working day starts at 09:00 til 17:30, with a lunch
break between 12:00 - 13:00. I work Monday to Friday.

How many working hours are there between 1st Oct 2007 15:00 to 4th
October 2007 11:30?

Also, what end date would i get if i added 35 working hours to the
1st Oct 2007 15:00?

Anybody got any suggestions how i can calculate these values the
most efficiently?

That's what I get paid for usually. Why not take a sheet of paper, paint a
time line and deliberate the logic on your own?

Armin

Oct 10 '07 #2

P: n/a
Armin Zingler wrote:
"Dan" <da**********@newcross-nursing.comschrieb
>I'm trying to calculate the total work hours between a start and end
date, and also working out an end date by adding a number of work
hours to a start date. Can anyone recommend a decent formula or
function that could do this?

For example, my working day starts at 09:00 til 17:30, with a lunch
break between 12:00 - 13:00. I work Monday to Friday.

How many working hours are there between 1st Oct 2007 15:00 to 4th
October 2007 11:30?

Also, what end date would i get if i added 35 working hours to the
1st Oct 2007 15:00?

Anybody got any suggestions how i can calculate these values the
most efficiently?


That's what I get paid for usually. Why not take a sheet of paper, paint
a time line and deliberate the logic on your own?

Armin
I cant be of help with an easy calculation other than looping thru each
day and adding up the hours, but
Don't forge to handle Daylight Savings Time.
Oct 10 '07 #3

P: n/a
"Dan" wrote:
I'm trying to calculate the total work hours between a start and end
date, and also working out an end date by adding a number of work
hours to a start date. Can anyone recommend a decent formula or
function that could do this?

For example, my working day starts at 09:00 til 17:30, with a lunch
break between 12:00 - 13:00. I work Monday to Friday.

How many working hours are there between 1st Oct 2007 15:00 to 4th
October 2007 11:30?

Also, what end date would i get if i added 35 working hours to the 1st
Oct 2007 15:00?

Anybody got any suggestions how i can calculate these values the most
efficiently?

Thanks in advance.

Dan
A few For...Next loops and the DateAdd, DateDiff functions would be the way
to go IMHO.

Or you could encapsulate DateAdd and DateDiff in your own WorkdayDateAdd()
and WorkDayDateDiff() functions.
Jan 8 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.