CREATE function [dbo].[sudf_Common_Date]
(
@intYear int,
@intMonth int,
@intDay int
)
-- returns a datetime value for the specified year, month and day
returns datetime
as
begin
-- Returns a date later than the base date (1.1.1900)
return dateadd(month,((@intYear-1900)*12)+@intMonth-1,@intDay-1)
end