I am using this code
SELECT DATENAME(month, GETDATE()) AS 'Month Name'
to get the month name. But how can I limit the name of the month up to 3 characters only? Example is FEB
in this month.
Assuming you're using SQL Server, you can use the SUBSTRING
function, i.e.
SELECT SUBSTRING(DATENAME(month, GETDATE()), 1, 3) AS 'Month Name'