Reputation: 1053
I have two columns with datetime values in this format dd/mm/yyyy hh:mm:ss.How do i calculate the difference between two columns in minutes and show a value if it exceeds certain minutes. For example if the difference of column B - A is less than 5 minutes, than it should show 'ok' else it should show 'fail'. Example
A B C
8/5/2015 3:25:00 PM 8/5/2015 3:35:00 PM Fail
Upvotes: 0
Views: 408
Reputation: 5901
All that is needed is this formula:
=IF((B1-A1)*1440<5,"OK","Fail")
(B1-A1)*1440
returns the number of minutes difference.
We're assuming that the second time is greater than the first. (And also assuming the same time zone.)
Upvotes: 1
Reputation: 630
You can use the Hour(), Minute() Day() and month() functions to create an amalgam formula - it doesn't seem particularly sensible to do with numbers alone using cell-INT(cell).
Upvotes: 0