how to calculate the datetime difference in microsoft excel? -


i have 2 columns datetime values in format dd/mm/yyyy hh:mm:ss.how calculate difference between 2 columns in minutes , show value if exceeds minutes. example if difference of column b - less 5 minutes, should show 'ok' else should show 'fail'. example

                          b                       c 8/5/2015  3:25:00 pm      8/5/2015  3:35:00 pm     fail  

all needed formula:

=if((b1-a1)*1440<5,"ok","fail")

(b1-a1)*1440 returns number of minutes difference.

we're assuming second time greater first. (and assuming same time zone.)


Comments