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:
00627128
Views:
38
This message has been marked as the solution to the initial question of the thread.
>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
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform