Solved Date and Time difference formula

October 16, 2012 at 07:55:12
Specs: Windows XP


Can anyone suggest a formula to calculat the time difference, this is to check whether the processing is completed within 48 hours.

Data is as below:

Col A Col B Col C Col D
Enque Date Enque Time Deque Date Deque time
10/1/2012 1:50:52 AM 10/4/2012 11:54:21 PM

I'm looking for a formula to calculate the time hour difference from Col A and B to Col C and D.

Thank you

See More: Date and Time difference formula

October 16, 2012 at 09:33:15
✔ Best Answer
First, a posting tip:

Before posting example data in this forum, please click on the blue line at the end of this post and read the instructions found via that link.

As for your question, assuming that your data is in Row 2, this should work:

=IF((C2-A2)*24+D2-B2<48,"Less than 48 hours","More than 48 hours")

It first determines the difference between your Date cells in hours via (C2-A2)*24, then adds to that the difference between your times via D2-B2 to get the total elapsed time in hours. If D2-B2 is negative, it will be subtracted from (C2-A2)*24.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •
Related Solutions

Ask Question