Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculating Age
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
00627078
Message ID:
00627140
Vues:
28
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform