Format date from database?

Viewed 95223

When I pull the date out of the db, it comes back like this:

2009-10-14T19:00:00

I want to format it in two different ways...

The first: F d, Y The second h:m (12 hour format)

Everything I try returns December 1969... Help?! I feel so confused...

5 Answers

Best of all and clear

$res_tbl ='select create_date from tbl_comments';
while($table =mysql_fetch_array($res_tbl))
{
  echo date('F d, Y h:mA', strtotime($table['create_date']));
  echo "<br>";
}

Output:

January 10, 2009 21:12
March 21, 2001  12:04
Related