Skip to content

Elegando

elegant » being unusually effective and simple… do » the way.

Tag: SQL

Calculate Age with SQL

Here’s a quickie… Calculate someone’s age with SQL:

select dob, 
    floor(datediff(day, dob, getDate()) / 365.25) as age 
    from personnel
Posted on March 1, 2010March 1, 2010Categories UncategorizedTags Server, SQL
Proudly powered by WordPress