Viewing 2 posts - 1 through 2 (of 2 total)
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 ,...
January 26, 2015 at 9:42 am
#1773166
I find this works better than a scalar function...
SELECT DATEDIFF(YEAR...
January 23, 2015 at 12:08 pm
#1772788