I'm trying to calculate the exact amount of hours between two timestamps in excel excluding the weekends. The timestamps are in the following format:
"yyyy-mm-dd hh:mm:ss"
I have tried using following formula, which seems to work fine, except for when my end date is in the weekend or on Mondays. In those cases it gives me a negative value even though end date is after start date.
=NETWORKDAYS([@start_date]];[@end_date])-1-MOD([@Start_date];1)+MOD([@end_date];1)
Example:
Start date ; end date ; Time difference
2017-09-30 06:47:00 ; 2017-09-30 07:19:16 ; -0,977592593
2017-08-13 19:30:00 ; 2017-08-14 04:37:46 ; -0,619606481
networkdays()
portion results in 0. you then -1 to it which is going to give you a negative number. Do not use -1 – Forward Ed