CREATE FUNCTION dbo.fn_dayofmonth (@dt datetime)
RETURNS int AS
BEGIN
declare @nextmonth
datetime
set @nextmonth=dateadd(m,1,@dt)
return(day(dateadd(day,-day(@nextmonth),@nextmonth)))
END
全站熱搜
留言列表