Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Convert a date field to month only

Author  Topic 

Andy_bkk
Starting Member

1 Post

Posted - 2010-06-15 : 06:03:31
I have a table of data which includes a date field (date items were entered into the database).

I need to now create a report that displays a count of all items by the Month they were entered (eg: Jan 10, Feb 10 etc).

The question is, how can I convert the date field to display just the Month (for preference)or at least convert to MMM-yy?

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-06-15 : 06:10:48
Have a look at
MONTH(DateColumn) and
YEAR(DateColumn)


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -