exact differnce between 2 dates & time networkdays give round off

P

panks

I would like to calculate differnce between two time instance without holidays.
so @ 4th july 2008 14:22:30 work started and it ended on 29th July 16:20:44
Then i want to calculate exact working time spent on the task. It should not
include holidays. I know networkdays give the answer but it rounds off the
result and I want exact differnce in fractions so that i can count upto exact
seconds spent on process.
 
B

Bob Phillips

=(NETWORKDAYS(date1,date2,holidays))
-(WEEKDAY(date1,2)<6)*(NOT(ISNUMBER(MATCH(INT(date1),holidays,0))))
-(WEEKDAY(date2,2)<6)*(NOT(ISNUMBER(MATCH(INT(date2),holidays,0))))
+((WEEKDAY(date1,2)<6)*(NOT(ISNUMBER(MATCH(INT(date1),holidays,0))))*(MIN(MAX(0,1-MOD(date1,1)),1)))
+((WEEKDAY(date2,2)<6)*(NOT(ISNUMBER(MATCH(INT(date2),holidays,0))))*(MIN(MAX(MOD(date2,1),0),1)))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top