1
votes

Trying to find the difference between two date&time inputs.

I have two cells for each input e.g.

Submitted:

Date: 02/09/2019 Time: 10:00

Completed:

Date: 03/09/2019 Time: 10:15

I am converting these into text format and combining with the following:

=TEXT(D2,"dd/mm/yyyy")&" "&TEXT(E2,"hh:mm")

This outputs a string in the format of dd/mm/yyyy hh:mm This output is done in cell L2

I then do the same for cells F2 & G2 outputting to M2

I now need to try to find the difference between L2 & M2

Need some help with the formula on this one if possible.

Not sure how to handle the comparison of both time and date in one formula. If there is a a way to avoid the initial conversion that would be fine too.

1
=(F2+G2)-(D2+E2)Scott Craner
That simple. Thanks Scott. Feel a bit stupidBatteredburrito
With that you will get a number the whole number is the number of days and the decimal is part of one day.Scott Craner

1 Answers

1
votes

The same have been answered through comment by @ Scott Craner and same accepted by @Batteredburrito

Answering behalf of @ Scott Craner , since the question is unanswered status.

Use : =(F2+G2)-(D2+E2)

With that you will get a number the whole number is the number of days and the decimal is part of one day.