Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: Calculate Age

    How 'bout this?

    declare @dob as datetime

    select @dob = '6/21/1968'

    declare @now as datetime

    declare @year_diff as tinyint

    select @now = getdate()

    select @year_diff = datediff(year, @dob, @now)

    if DateAdd(year, @year_diff, @dob) > @now

    select @year_diff -1

    else

    select...

Viewing post 1 (of 1 total)