Time Subtracting

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

Guest

I have two long time fields and a query that subtracts the difference. In
the query I have an additional field for short time. I want the equation to
subtract the difference between each long time field and subtract out the
short time. I'm not sure how to do this.

Basically how do you get a time field to subtract out another time field. I
am having errors. Any reason the short time field can't subtract out another
short time field in the query???
 
Date/time fields are all the same in Access. They may be displayed in
different formats on forms and reports but they are all stored exactly the
same in your tables.

You can treat them like floating point numbers and perform all kinds of
basic math on them. Perhaps if you provided some sample records and desired
display, someone could find what you are doing wrong.
 
I would think that the only reason you would like to subtracks to fields is
to get the difference between them, if that the case you should use datediff
function

datediff("n",format(FieldTime1,"hh:mm"),format (FieldTime2,"hh:mm"))

will give you the difference by minutes
if then you want to add that difference to another filed then you should use
the dateadd function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top