How do I calculate the total number of days?

G

Guest

I have 2 fields, Field 1 is Admission, Field 2 is Discharge. These fields are
date fields. The 3rd Field is Retention. In this field I would like this
field to get the total number of days client 1 was with our program from date
of admission to the date of Discharge. What function, or how would I
calculate field 1 and field 2 to get the total days for field 3.
 
R

Rick B

First, you don't store the information in Field3. It is not proper database
design to store a calculated result in a field. When you need the number,
simply calculate it in your forms, queries, or report. No need for Field3
in your table.

To calculate it, Use the DateDiff function.

=DateDiff("d", [Field1], [Field2])
 

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

Top