Calculate date difference.

C

Charles Harris

How would I calculate the difference between two dates
and, have the calculated difference show up as a value
beside each date. I'm thinking I would have to add
another column to the table and place a quey for that
column. Or is there a built in function within Access
that allows me to do this.
 
W

Wayne Morgan

There is a built in function. You could add a calculated field to a query or
do this in a calculated textbox on a form or report. The functions you want
are DateAdd and DateDiff. DateAdd accepts a single date and interval to
compute a new date. DateDiff accepts two dates to compute the elapsed time
between them. Both have parameters for what the elapsed time should be
(days, weeks, years, etc).
 

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

Similar Threads


Top