dates, times & datetimes

S

SteveH

Hi All

I have a table with the following 4 columns

arrival_date Date/Time 30/06/2004
arrival_time Text 1500
departure_date Date/Time 01/07/2004
departure_time Text 0230

I want to be able to calculate the difference between
arrival and departure. ie. 11:30

If realise if I had arrival_datetime & departure_datetime
I could use the datediff function, but I cannot work out
how to combine the Date/Time column and the Text column to
get a combined Date/Time column.

Any help appreciated.

Thanks
SteveH
 
S

Steve Schapel

Steve

I think this should work...

arrival_datetime: [arrival_date]+TimeValue(Left([arrival_time],2) & ":"
& Right([arrival_time],2))

Do the equivalent for departure_datetime. Then, as you suggested, apply
your DateDiff() to these.
 
Top