Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculating Age
Message
De
06/03/2002 16:53:27
 
 
À
06/03/2002 16:45:53
Eugenijus Rimkus
SPAB Siauliu energija
Siauliai, Lithuania
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
00627078
Message ID:
00629271
Vues:
40
This message has been marked as the solution to the initial question of the thread.
One more into the ring...

SELECT
CASE
WHEN DATEADD(year, DATEDIFF (year, @bdate, GETDATE()), @bdate) > GETDATE() THEN DATEDIFF (year, bdate, GETDATE()) - 1
ELSE DATEDIFF (year, bdate, GETDATE())
END

BTW, this comes from the SQL Server FAQ.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform