this is my SP
USE
[TASKDB]GO
SET
GO
SET
GO
ANSI_NULLS ON QUOTED_IDENTIFIER ONALTER PROCEDURE [dbo].[GetCmtRpt]-- Add the parameters for the stored procedure here @logid AS BEGIN END
i want to display the months field as jan feb mar based on date how to do...?

Soft CornerRank #1,221 · 1.5K reputationPosted Feb 22, 2011, 11:54 PM EST
Try this in ur sproc
select DATENAME(month, '5/1/06') --'mm/dd/yy'
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Feb 23, 2011, 1:40 AM EST
SELECT CONVERT(VARCHAR(9), GETDATE(), 6) AS [DD MON YY] -- 23 feb 11
SELECT CONVERT(VARCHAR(11), GETDATE(), 106) AS [DD MON YYYY] -- 23 feb 2011
Try this. Its working fine.
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Feb 23, 2011, 1:42 AM EST
In my previous reply, Instead of GETDATE() you can give your date variable.