Date Manipulation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I currently have a table that has arrival and departure times formated in the
general date format. In my query I would like to subtract the two dates and
only get the difference of the times. I tried using the DateDiff() command,
but it keeps on asking me for a parameter. When I run the query, I need to
get that difference of times, please help me.
 
I currently have a table that has arrival and departure times formated in the
general date format. In my query I would like to subtract the two dates and
only get the difference of the times. I tried using the DateDiff() command,
but it keeps on asking me for a parameter. When I run the query, I need to
get that difference of times, please help me.

The syntax of DateDiff is

DateDiff("n", [departure time], [arrival time])

to get the time difference in miNutes ("s" is Seconds, "h" is Hours,
"d" is Days, "m" is Months). Just put this expression in a vacant
field cell in your query, using your own field names of course.

John W. Vinson[MVP]
 
Back
Top