Good afternoon, Does anyone have a formula to convert DOB to age so I can run a report that pulls patients from ages 50 to 75?
Thank you Peg
OK, a quick one I use is:
(DateDiff ("m",{PERSON.DATEOFBIRTH} , currentdate))/12
Now I do months, so I can get one decimal place - sometimes important when trying to verify.
Now, and alternative is when I want age at a time - like when a document was done.
Then I create a formula variable = aDocDate
NumberVar ID := {DOCUMENT.CLINICALDATE};
NumberVar Sec := Truncate(ID / 1000000);
// Convert seconds to days
NumberVar Days := Truncate(Sec / 3600 / 24);
// Convert days to a date (and time)
//DateTime(Date(1960,01,01) + Days , Time(0,0,0) + Sec)
DateTime(Date(1960,01,01) + Days , Time(0,0,0))
In this case, I would replace the currentdate with my variable aDocDate