all groups > sql server new users > april 2005 >
You're in the

sql server new users

group:

Using a Query to show just the month in of a date field


Using a Query to show just the month in of a date field Steve Roberts
4/28/2005 8:57:33 AM
sql server new users:
I need to create a query to show the month as Jan, Feb ... instead of 1, 2.
Is there a way to do this?

This query works fine except I get the month number instead of Jan, Feb

SELECT emLastName, emFirstName, emEmployee, emHireDate, DATEPART(m,
emHireDate) AS HireDate
FROM dbo.AllAdvantageEmployees

Thanks

Steve

Re: Using a Query to show just the month in of a date field Keith Kratochvil
4/28/2005 10:03:04 AM
You probably want to use DATENAME:

SELECT DATENAME(mm,GETDATE())

--
Keith


[quoted text, click to view]

Re: Using a Query to show just the month in of a date field Steve Roberts
4/28/2005 2:53:47 PM
That was almost too easy!

Thanks
Steve

[quoted text, click to view]

AddThis Social Bookmark Button