Posts by Daniel Sorensen • 21 points
1 post
-
2
votes8
answers48170
viewsA: How to calculate a person’s age in SQL Server?
declare @dataNasc datetime ='1973-06-03' SELECT idade= convert (int, convert( decimal,convert (varchar( 10), getdate(), 112)) /10000 - convert( decimal,convert (varchar( 10), @dataNasc , 112))…