Click here to Skip to main content
15,890,512 members
Articles / Programming Languages / SQL

Get an Accurate Age by Date

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
19 Feb 2010CPOL 7.8K  
This would work too :)As an explanation, I use datediff to get the number of days, divide that by the correct number of days in a year (keeping track of leap years, there are only 97 in every 400 years) and then FLOOR the result, thus making sure it doesn't get rounded up accidentally....

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Pengdows
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions