datetime转换到日期只有php

i'd like to convert this datetime that was generated by MySQL, i'd like to convert this to just Month and day. This is my current format 2012-09-17 00:55:56

and I want to convert it to September 17 only

how can I do this using PHP code?

Thanks in advance!

Why not do it directly in MYSQL using DATE_FORMAT()

SELECT DATE_FORMAT('2012-09-17 00:55:56','%M %d')

SQLFiddle Demo

date("F d",strtotime($datefromdatabase)); //with leading zero in date

or

date("F j",strtotime($datefromdatabase)); //without leading zero in date

DateTime solution:-

$date = DateTime::createFromFormat('Y-m-d h:i:s', getDateSomeHow());
echo $date->format('F d');