How to find out age of person in sql server?

Total Post:412

Points:2888
 2489  View(s)
Ratings:
Rate this:
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.
  1. Post:14

    Points:98
    Re: How to find out age of person in sql server?

    you can use datediff() function to find out age of person in sql server.

  1. Post:412

    Points:2888
    Re: How to find out age of person in sql server?

    Post is removed by the Admin.

  1. Post:100

    Points:700
    Re: How to find out age of person in sql server?

    Hi, 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.

Answer