Format a DateTime field

Hi Guys,

Can somebody help me to format a Datetime field "Eventdate"  in my SQL query to this format:

24 Jul 2012

This is the query:

"SELECT EventDate, EventDescription FROM Events"
dizzycatAsked:
Who is Participating?
 
nishant joshiConnect With a Mentor Technology Development ConsultantCommented:
IF eventdate is datetime then

SELECT CONVERT(VARCHAR(11),EventDate,106) AS [DD MON YYYY]  EventDescription FROM Events
0
 
sdstuberCommented:
CONVERT(VARCHAR(11), eventdate, 106)
0
 
wdosanjosCommented:
SELECT convert(varchar(20),EventDate,106) as EventDate, EventDescription FROM Events

Other date/time formatting options here:
http://msdn.microsoft.com/en-us/library/ms187928%28v=sql.100%29.aspx
0
 
AnuroopsunddCommented:
0
 
sdstuberCommented:
wouldn't a split be in order?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.