Here is query for showing
complete month name, month number and month name in MMM or 3 character format
SELECT
DATENAME(mm,GETDATE()) AS [Month Name], -- Dispaly complete Month Name
MONTH(GETDATE()) AS
[Month Number], -- Dispaly Month number as NN digit
SUBSTRING(DATENAME(mm,GETDATE()),1,3) AS Month Name In MMM -- Dispaly Month name in 3 characters
Output:
Month Name
|
Month Number
|
Month Name In MMM
|
July
|
7
|
Jul
|
Very nice sharma bhai
ReplyDeletei want to get date from my colom
Delete