Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: Best Way to Calculate Age

    Siendo hoy 17-07-2008

    declare @DateOfBirth datetime

    set @DateOfBirth = '19660117'

    select DATEDIFF(yy, @DateOfBirth, GETDATE()) - CASE WHEN DATEPART(m, @DateOfBirth) >= DATEPART(m, GETDATE()) AND DATEPART(d, @DateOfBirth) >= DATEPART(d, GETDATE()) THEN 0 ELSE 1...

Viewing post 1 (of 1 total)