Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculating Age
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
00627078
Message ID:
00627192
Views:
31
>>>Anyone know how to calculate the age from a date of birth in a sql statement.
>>>Date of birth is stored in a datetime field (DOB).
>>>
>>>Example:
>>>
>>>select lastname,firstname,dob,age
>>
>>
select lastname,firstname,dob, Datediff(Month, dob, getdate())/12 as age
>
>
>Sergey;
>
>I thought if I just asked my mother I could get a quick answer! :)
>
>Tom

Yea, it would work if you have a reference to the mother object. :)
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform