How to get Current Month Name in string format?

Here is a small piece of code to do it.

How to get Current Month Name in string format?

print datename(Month,getdate()) --- September


Sample Code..

DECLARE @intMonth int
SET @intMOnth = 2
select DateName(Month,convert(varchar(2),@intMonth) + '/01/2000') --- 'February'

No comments: