Getting the Day Part of my DATE Field in Mysql PHP

Hello Guys

I have a date field in my mysql database, I would like to get the Day Part

eg I have 12/02/2009  and i would just like to get  February 12 from it.

Thanks for any help
$row['DOB']

Open in new window

CampbellhAsked:
Who is Participating?
 
Loganathan NatarajanLAMP DeveloperCommented:
It is very simple, just modify your sql where you retrieve.


SELECT DATE_FORMAT(db_date_field, '%M %d');

Open in new window

0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you should modify the query to return a field with date value, using DATE_FORMAT() function:
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-format
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.