PostgreSQL Calculate Age From Birthdate

SELECT EXTRACT(year from AGE(NOW(), '1985-08-21')) as "age";
PG

Author: admin

Random Posts

Digg Delicious Stumbleupon Technorati

3 Responses to “PostgreSQL Calculate Age From Birthdate”

  1. nice . so simple . i’ve tried it =)

  2. Have you used much PostgreSQL, what are your thoughts about it vs MySQL?

  3. Thanx, very simple useful.

Leave a Reply