>>>
>>>"WHERE [Date subtraction calculation] <= 18" && Kid is under 18 years old
>>>
>>>- or -
>>>
>>>"WHERE [Date subtraction calculation] <= 90" && Kid is under 90 months old
>>>
>>>I need to do subtraction since I'm looking for kids with the dx in the past 3 years so I need to calculate Dob vs discharge date.
Sorry for the thick-headedness. In Oracle, there is a function called MONTHS_BETWEEN which returns the months between 2 dates --
...where MONTHS_BETWEEN(SYSDATE, DX) <= 18
The order of the dates passed is important because Date2 [DX] is subtracted from Date1 [SysDate].
There is another function called ADD_MONTHS which works exactly the same as VFP's GOMONTH function. The 1st parameter is a date, and the 2nd parameter is the number of months to either add or subtract from the date.
Mark McCasland
Midlothian, TX USA