how to display the months based on date
-
hi.. this is my SP USE [TASKDB] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[GetCmtRpt] -- Add the parameters for the stored procedure here @logid int AS BEGIN SET NOCOUNT ON; -- Insert statements for procedure here SELECT Date ,From_Name ,To_Name ,Todays_Task ,Tommorrows_Task ,Status,Comments,Date as months from TaskSheet inner join login on TaskSheet .loginID = login.loginID where login.loginID = @logid order by Date desc END i want to display the months field as jan feb mar based on date how to do...?
-
hi.. this is my SP USE [TASKDB] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[GetCmtRpt] -- Add the parameters for the stored procedure here @logid int AS BEGIN SET NOCOUNT ON; -- Insert statements for procedure here SELECT Date ,From_Name ,To_Name ,Todays_Task ,Tommorrows_Task ,Status,Comments,Date as months from TaskSheet inner join login on TaskSheet .loginID = login.loginID where login.loginID = @logid order by Date desc END i want to display the months field as jan feb mar based on date how to do...?
Here it is:
SELECT substring(DATENAME(month, getdate()),1,3) AS MonthName
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com