G
Guest
PLEASE PLEASE HELP,
What I need are the excat hours/minutes between 2 dates, my date format is as follows: -
a) 24/06/04 12:15:11
b) 25/06/04 13:10:03
The hours I want counted for in a day are between 09:00 & 17:00. My formula for counting the hours/mintues are fine as long as the dates are on the same day, my problem is it brings me back an "#NUM!" error when the dates are different. Can anyone help me here?? Please find below my current formula: -
=IF(AND(INT(L2)=INT(O2),NOT(ISNA(MATCH(INT(L2),U:U,0)))),0,ABS(IF(INT(L2)=INT(O2),ROUND(24*(O2-L2),2),(24*($V$5-$V$4)*(MAX(NETWORKDAYS(L2+1,O2-1,U:U),0)+INT(24*(((O2-INT(O2))-(L2-INT(L2)))+($V$5-$V$4))/(24*($V$5-$V$4))))+MOD(ROUND(((24*(O2-INT(O2)))-24*$V$4)+(24*$V$5-(24*(L2-INT(L2)))),2),ROUND((24*($V$5-$V$4)),2))))))
- L2 = START DATE
- O2 = COMPLETED DATE
- V4 = 09:00
- V5 = 17:00
Thanks again.
James.
What I need are the excat hours/minutes between 2 dates, my date format is as follows: -
a) 24/06/04 12:15:11
b) 25/06/04 13:10:03
The hours I want counted for in a day are between 09:00 & 17:00. My formula for counting the hours/mintues are fine as long as the dates are on the same day, my problem is it brings me back an "#NUM!" error when the dates are different. Can anyone help me here?? Please find below my current formula: -
=IF(AND(INT(L2)=INT(O2),NOT(ISNA(MATCH(INT(L2),U:U,0)))),0,ABS(IF(INT(L2)=INT(O2),ROUND(24*(O2-L2),2),(24*($V$5-$V$4)*(MAX(NETWORKDAYS(L2+1,O2-1,U:U),0)+INT(24*(((O2-INT(O2))-(L2-INT(L2)))+($V$5-$V$4))/(24*($V$5-$V$4))))+MOD(ROUND(((24*(O2-INT(O2)))-24*$V$4)+(24*$V$5-(24*(L2-INT(L2)))),2),ROUND((24*($V$5-$V$4)),2))))))
- L2 = START DATE
- O2 = COMPLETED DATE
- V4 = 09:00
- V5 = 17:00
Thanks again.
James.