Crystal 8.5
SQL Database
Good Morning,
I am trying to calculate patient age by months. I have a patient date of birth field and am subtracting that date from a vst start date field to get current age.
@Age=Month({vst.vst_start_date}) - Month({pt.birth_dtime})
When the report runs, I just get the calculation between the months regardless of the year. This does not work when the vst start date and the birthdate fields are different years. Any help would be appreciated. Thank you
Example:
REG DATE PT AGE IN MONTHS DOB
Patient A 07/13/2005 -5.00 12/03/2002
Patient B 02/14/2005 -10.00 12/09/2002
Patient C 07/22/2005 -5.00 12/22/2002
Looking For:
REG DATE PT AGE IN MONTHS DOB
Patient A 07/13/2005 32.00 12/03/2002
Patient B 02/14/2005 27.00 12/09/2002
Patient C 07/22/2005 32.00 12/22/2002
SQL Database
Good Morning,
I am trying to calculate patient age by months. I have a patient date of birth field and am subtracting that date from a vst start date field to get current age.
@Age=Month({vst.vst_start_date}) - Month({pt.birth_dtime})
When the report runs, I just get the calculation between the months regardless of the year. This does not work when the vst start date and the birthdate fields are different years. Any help would be appreciated. Thank you
Example:
REG DATE PT AGE IN MONTHS DOB
Patient A 07/13/2005 -5.00 12/03/2002
Patient B 02/14/2005 -10.00 12/09/2002
Patient C 07/22/2005 -5.00 12/22/2002
Looking For:
REG DATE PT AGE IN MONTHS DOB
Patient A 07/13/2005 32.00 12/03/2002
Patient B 02/14/2005 27.00 12/09/2002
Patient C 07/22/2005 32.00 12/22/2002