I need a sql query that is based on how old someone will be on a future date based on their birthday.
the following formula works in Crystal:
TRUNCATE((DATE(2001,06,30) - {table.BIRTHDAYfield})/365)
but these formulas do not work in sql:
TRUNCATE(('06/30/2001' - {table.BIRTHDAYfield})/365)>=28
(('6/30/2001' - birthdayfield)/365)>=28
We've tried datediff too, but that doesn't seem to give the correct records b/c it's based on the year and not the full date.
Thanks in advance for your help
the following formula works in Crystal:
TRUNCATE((DATE(2001,06,30) - {table.BIRTHDAYfield})/365)
but these formulas do not work in sql:
TRUNCATE(('06/30/2001' - {table.BIRTHDAYfield})/365)>=28
(('6/30/2001' - birthdayfield)/365)>=28
We've tried datediff too, but that doesn't seem to give the correct records b/c it's based on the year and not the full date.
Thanks in advance for your help