Thursday, 23 August 2018

Get Name of the month from the sql server from month

///////For the full name

select DateName(MM,DATEADD(MM,Month(getdate())-1,0))


///////For the full name

select left(DateName(MM,DATEADD(MM,Month(getdate())-1,0)),3)


//////////// Result

1. August
2. Aug


No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...