复制代码 代码如下:
-- =============================================
-- Author: Insus.NET
-- Create date: 2012-12-18
-- Description: Get Month abbreviation name
-- =============================================
CREATE FUNCTION [dbo].[udf_MonthShortName]
(
@input DATETIME
)
RETURNS NVARCHAR(3)
AS
BEGIN
DECLARE @rtn NVARCHAR(3)
SET @rtn = SUBSTRING(DATENAME(MONTH,@input), 1, 3)
RETURN @rtn
END
新闻热点
疑难解答