How do I subtract dates in a query with am/pm involved?

A

Ally

I want to subtrac one date and time inthe format of

07/06/05 12:34:20 pm

what are the criterias and information I need to solve this... I need the
difference in 2 times... The times are in 2 different columns in a table...
so I need ot subtract

T7 form T6 those are the column names.... inside is rows of different
times...

please help
 
O

Ofer

Use the DateDiff Function, read the help about it with the different types to
compare the two dates, and select the appropriate one for you

DateDiff("n",[T7],[T6]) ' will display the different in minutes
 
M

Marshall Barton

Ally said:
I want to subtrac one date and time inthe format of

07/06/05 12:34:20 pm

what are the criterias and information I need to solve this... I need the
difference in 2 times... The times are in 2 different columns in a table...
so I need ot subtract

T7 form T6 those are the column names.... inside is rows of different
times...


You should use the DateDiff function to do that. For
example, to get the difference in minutes:

DateDiff("n", T7, T6)
 
Top