Is it possible to get month names between two dates in SQl
month names
SQl
ie, 2011-05-01 And 2011-08-01 are the inputs I just w
2011-05-01
2011-08-01
Try this:
declare @sd date=getdate(), @ld date='2016-01-01' select Datename(month,dateadd(month,number,GETDATE())), number from master.dbo.spt_values where type='p' and dateadd(month,number,GETDATE()) <= @ld