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...?
Jaganathan BantheswaranPosted Feb 23, 2011, 6:42 AM
In my previous reply, Instead of GETDATE() you can give your date variable.
Jaganathan BantheswaranPosted Feb 23, 2011, 6:40 AM
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.
Soft CornerPosted Feb 23, 2011, 4:54 AM
Try this in ur sproc
select DATENAME(month, '5/1/06') --'mm/dd/yy'