Home Forums Article Discussions Article Discussions by Author Discuss content posted by Rookie How to get monthly YTD data RE: How to get monthly YTD data
Junie01
Say Hey Kid
Points: 694
More actions
January 24, 2012 at 2:57 am
#1437534
what's wrong with just using the datename function ?
i.e. select datename(mm,getdate()) --retuns a value of January
and then if you just want the 1st 3 letters add a left to the command
select left(datename(mm,getdate()),3) --retuns a value of Jan