Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: Calculate age - Most easiest way

    Thanks for catching that, andrew_dale!

    Here's the fix...

    CREATE FUNCTION dbo.AgeInYears

    (

    @BirthDate DATETIME2,

    @AsOfDate DATETIME2

    )

    RETURNS TABLE

    AS

    RETURN

    (

    SELECT DATEDIFF(YEAR ,...

  • RE: Calculate age - Most easiest way

    I find this works better than a scalar function...

    CREATE FUNCTION dbo.AgeInYears

    (

    @BirthDate DATETIME2,

    @AsOfDate DATETIME2

    )

    RETURNS TABLE

    AS

    RETURN

    (

    SELECT DATEDIFF(YEAR...

Viewing 2 posts - 1 through 2 (of 2 total)