Convert date field getdate() to "July 29" only

  • I simply need to turn a date field into the full month name and the day of the month only. No year. So, if we were using getdate() for this if I just did this:

    select getdate()

    I would get this returned; 2010-07-29 17:25:13.110

    However, I need to convert that to this only; "July 29"

    How can I do this?

    select convert(varchar,convert(datetime,getdate()),100) gets me close withi Jul 29 2010 5:25PM but that's not what I need. Can anyone please help?

    Thanks for looking!

  • Try:

    SELECT DATENAME(month, GETDATE()) + ' ' + DATENAME(day, GETDATE())

    This also works in different languages:

    SET LANGUAGE N'e???????' /* Greek */

    SELECT DATENAME(month, GETDATE()) + ' ' + DATENAME(day, GETDATE())

  • Thanks so much! That definitely gets me what I need.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply