Is there a way I can format mySQL dates on retrieval rather than by using php functions?
It is much easier to use the mysql DATE_FORMAT() function to format your dates when retrieving directly from the data base. You do not have to convert to a UNIX time stamp and all that other stuff. Your select statement should look something like: $date_format_long=”%d:%m:%y at %T”; $query=”select DATE_FORMAT(date_field, ‘$date_format_long’ ) as fmt_date from your_table”; RTM at http://www.mysql.