ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   exact differnce between 2 dates & time networkdays give round off (https://www.excelbanter.com/excel-worksheet-functions/194058-exact-differnce-between-2-dates-time-networkdays-give-round-off.html)

panks

exact differnce between 2 dates & time networkdays give round off
 
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.

Bob Phillips

exact differnce between 2 dates & time networkdays give round off
 
=(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(dat e1),holidays,0))))*(MIN(MAX(0,1-MOD(date1,1)),1)))
+((WEEKDAY(date2,2)<6)*(NOT(ISNUMBER(MATCH(INT(dat e2),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)

"panks" wrote in message
...
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.





All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com