CREATE function [dbo].[uf_date_cn]
(
@input_date nvarchar(100)
)
RETURNS VARCHAR(100)
AS
begin
declare @month int
set @month = month(CAST(@input_date AS datetime))
declare @day int
set @day = day(CAST(@input_date AS datetime))
declare @year int
set @year = year(CAST(@input_date AS datetime))
declare @out_put nvarchar(100)
set @out_put = ''
declare @strMonth nvarchar(50)
if(@month < 10)
begin
set @strMonth = '0' + cast(@month as nvarchar(50))
end
else
begin
set @strMonth = cast(@month as nvarchar(50))
end
declare &
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)