Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 1 of 1 total
Thread Subtracting dates
Wed, Mar 9 2016 9:08 AMPermanent Link

Suzanne C Nuss

I am doing a simple date difference:  DischargeDate-AdmissionDate = Length of Stay
Delphi XE7, ElevateDB 2.18b3

If i run this in EDBMgr, all is well - i get the difference in days.
whether I use:  

Select from ClientProgram
ClientProgram.DischargeDate -ClientProgram.AdmissionDate as  LOS
or
Select from ClientProgram
(ClientProgram.DischargeDate -ClientProgram.AdmissionDate as INTERVAL DAY) as LOS

When i put the query into DelphiXE7 Query object and put the query into place (either syntax)
I consistently get a result in milliseconds.

Yes, i can adjust this on my report by dividing by 86400000 but it is driving me crazy.  I trolled through the support groups on Interval arithmetic but didn't see anything that suggests my error.

Any ideas?  tia
Suzanne
Image