Hello Guys,.
I've suffering with a problem since last night, actually I've a date of birth(DOB) of any person and I want to find out the current age of that person but I don't have any idea about it. Can you tell how do this?
Please resolve my problem.
How to find out age of person in sql server?
314515-Sep-2012
Updated on 07-Dec-2012
Vijay Shukla
07-Dec-2012Hi, Mr. Pravesh Singh
you can use simple query for solving your problem.
SELECT DATEDIFF(year,'1989-12-05',getdate()) 'Age'
Here DateDiff() is a Sql aggregate Function that will return difference between two dates, and getdate() method will return current system DateTime.
Pravesh Singh
20-Oct-2012Anonymous User
27-Sep-2012