Thursday, November 29

SQL- User Defined Function For Date Format ( Mon_DD_YYYY )


Function for user defined date format ( Mon_DD_YYYY )
create function dbo.CustomDate_Mon_DD_YYYY(@datee varchar(255))
returns varchar(255)
As
begin

SET @datee = CONVERT(VARCHAR(12), GETDATE(), 107)

return @datee
end

**This function allows you to get result-set of date field in Mon_DD_YYYY format. i.e. oct 07 2012