Is there a way to take a MYsql date in the format of YYY-mm-dd and convert it into the format of something like “Monday, June 6”. If there is a way, could someone please post the script, I am stumped on this one.
@rbailerauthorJun 08.2005 — #Hey thanks for the help, i didnt know it was that easy. I'm now trying to put the date back into MYsql format and I tried this. Am I close?
mysql_query("UPDATE Shipping SET ship_date = DATE_FORMAT($shipdate, '%Y-%M-%d') WHERE orderid= '$oid' ");
@NogDogJun 08.2005 — #No, the first parameter to DATE_FORMAT() needs to be a mysql date already.
Maybe you want to get both formats in your query, then use whichever you need depending on the situation: [code=php] $query = "SELECT date_col AS date_mysql, DATE_FORMAT(date_col, '%W, %M %e') AS date_text FROM table_name"; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { echo "<p>MySQL format date: {$row['date_mysql']}</p>n"; echo "<p>Text format date: {$row['date_text']}</p>n"; } [/code]