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
About this entry
You’re currently reading “Calculate Age with SQL,” an entry on Elegando
- Published:
- 03.01.10 / 3pm
- Category:
- SQL Server
No comments
Jump to comment form | comments rss [?]