How to Calculate times across midnight. (1 Viewer)

shoggy

Registered User.
Local time
Today, 03:35
Joined
Jan 15, 2007
Messages
11
Calculate time across midnight in ms access
--------------------------------------------------------------------------

Hi,

I have created a database to store patient arrival date, arrival time and departure time.

I am trying to set up a query to calculate the total waiting time for each patient from arrival time to departure time.

At the minute I can calculate the total waiting time in minutes by:

Minutes: DateDiff("n",[Time Arrived],[Time Left Department])

and the total waiting time in hours and minutes by the following:

Waiting Time: [Minutes]\60 & Format([Minutes] Mod 60,"\:00")

But this does not work accross midnight, as it gives a negative time for anyone seen before midnight and discharged after midnight.

Any help much appreciated.
 

shoggy

Registered User.
Local time
Today, 03:35
Joined
Jan 15, 2007
Messages
11
Cheers,

Thanks very much:) :) :)
 

Users who are viewing this thread

Top Bottom