Page 1 of 1

Displays dates

Posted: Thu Jun 18, 2009 4:44 am
by robaiken
hi i was wondering how i can display a list of items from mysql database for the current month. my date formate in the database is 0000-00-00.

Thanks

Re: Displays dates

Posted: Thu Jun 18, 2009 5:39 am
by mattpointblank

Code: Select all

 
echo date("y-m-d g:i:a", strtotime($date));
// assumes $date contains the date row from your database
 
Use the syntax here to customise the formatting: http://uk2.php.net/manual/en/function.date.php