<分区>
Possible Duplicates:
How to calculate age (in years) based on Date of Birth and getDate()
How do I calculate someone’s age in C#?
如何根据客户的出生日期自动计算客户年龄 使用 C# 和 SQL Server 2005
<分区>
Possible Duplicates:
How to calculate age (in years) based on Date of Birth and getDate()
How do I calculate someone’s age in C#?
如何根据客户的出生日期自动计算客户年龄 使用 C# 和 SQL Server 2005
最佳答案
来自 here :
SELECT DATEDIFF(hour,@dob,GETDATE())/8766 AS AgeYearsIntTrunc
关于sql-server - 在 SQL 和 C# 中根据出生日期计算年龄?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2902401/