Translating output of MySQL -> English
Okay, I have a table called ENTRIES, and to get the date, I'm using the code:
PHP Code:
Can I translate this into "February 2, 2005 1:15 PM" somehow? And furthermore, If I were to make a query so people could select what month they'd want to see entries from, could I write a good query to find that? |
To translate a date use this:
$timeposted = date("d.m.Y \a\t H:i:s ",strtotime($row[0])); This will reformat the timestamp variable and make it in any kind you want. See www.php.net for details on the date function. d=day, m=month, Y=year, H=hour in 24 hour format, and so on. See www.php.net for details. |
All times are GMT -5. The time now is 05:52 PM. |