# Converting hours to minutes

S

#### sjames

ADMIT TIME DISCH TIME
12:19 AM 7:10 AM
12:39 AM 4:00 AM
2:25 PM 7:30 PM
7:06 PM 12:35 AM
8:49 PM 11:42 PM

I need to find the sum of the Admit time and the Disch time(time patients
waited to be seen), then convert the answer into minutes?
Will someone please help me? I am just learning Excel and this task has
really been daunting.

D

#### David Biddulph

If you really want the sum, it would be =SUM(A2,B2)*24*60 or =(A2+B2)*24*60.
If, as I suspect, you want the difference rather than the sum, then
=(B2-A2)*24*60.
In each case, format the result as Number or General, not as Time.

R

#### Ray

David,
This formula will not work if a patient arrives before midnight and is seen
or discharge after midnight.
I don't know how to write the correct formula, perhaps you could modify it

R

#### RagDyer

One way:

=MOD(B2-A2,1)*1440

R

#### Ray

Thanks RagDyer
I have finally figured the full formula:

=IF(A1>B1,MOD(B1-A1,1)*1440,(B1-A1)*1440)

This should give the time in minutes between A1 and B1 whether the patient
is there thru midnight or not.

R

#### RagDyeR

The Mod() formula works for *all* cases ... try it ... you'll like it!<bg>
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

Thanks RagDyer
I have finally figured the full formula:

=IF(A1>B1,MOD(B1-A1,1)*1440,(B1-A1)*1440)

This should give the time in minutes between A1 and B1 whether the patient
is there thru midnight or not.