Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
wided
Posting Yak Master
218 Posts |
Posted - 2010-09-23 : 06:39:14
|
How to calculate the age of a personwhen i have a Date of birth In a given date(By using the functions date or others functions)exampleDate of birth = '19840922' or other date given date ='20100930'thanksPS: sql2000 or sql2005 |
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-09-23 : 06:52:39
|
You need to use datediff functionHave a look at:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=11578 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-09-23 : 13:56:09
|
http://www.kodyaz.com/articles/calculate-age-sql-code.aspx------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
wided
Posting Yak Master
218 Posts |
Posted - 2010-09-24 : 04:57:47
|
thanks visakh16 datediff need year or month .....if my given date ='20100930'a person born in '19840921' have 26 yearand a person born in '19841020' have 26 year tooI do not want to show those who were born in October, November and December |
|
|
wided
Posting Yak Master
218 Posts |
|
|
|
|