Data Type Error When Calculating

J

Joanne

I have a query where the "Admit Date" is subtracted from
the "Discharge Date" to give me the length of stay (LOS).
In my report, there is a field that shows the LOS. My
problem is that I would like to total all of the LOS
entries in the footer. I get an error that says I am
using the wrong data type. It thinks that my LOS field is
a date & not a number.

Does anyone know how to get around this?
 
E

ET Sherman

If you are creating LOS in a control on the report then
set the control source to:

=DateDiff("d",[Admit Date],[Discharge Date])

If you are creating LOS in the query then:

LOS: DateDiff("d",[Admit Date],[Discharge Date])

Regards,

ET Sherman
 

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