Data Type Error When Calculating

  • Thread starter Thread starter Joanne
  • Start date Start date
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?
 
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
 
Back
Top