Using the datediff expression, I would like to get the amount of years from a DATE OF BIRTH field minus the current date. Is the variable for current date =CURDATE?
For example: datediff(yy,date_of_birth,curdate)
This doesn't seem to work, however I can change curdate to another date from a different feild like so....
datediff(yy,date_of_birth,date_of_death) ..this produces the years ok. Maybe i can't use CURDATE with the DATEDIFF expression?
Thanks,
Russ "SQL Newbie
For example: datediff(yy,date_of_birth,curdate)
This doesn't seem to work, however I can change curdate to another date from a different feild like so....
datediff(yy,date_of_birth,date_of_death) ..this produces the years ok. Maybe i can't use CURDATE with the DATEDIFF expression?
Thanks,
Russ "SQL Newbie