la***********@zipmail.com wrote:
Hello,
Using PHP 4, MySQL 4, I am getting a date field
$dbh = executeSQL($query);
while ($row = mysql_fetch_array($dbh)) {
$offer_id = $row['offer_id'];
$dep_date = $row['depart_day'];
// print out date
print $dep_date;
THe problem is the date prints out in this form "2006-02-05 00:00:00"
and I want it to print out like this "02/22/2006".
How can I do this? I would prefer to use a PHP function as opposed to
applying some MySQL date function prior to extracting the result.
Thanks, - Dave
I am just curious as to why newbies (and some experienced folks as well) ask
questions here that can readily be found 1) using google and 2) using the
documentation that has been developed for PHP and MySQL and not have to wait an
hour or more before someone replies...
Dave the answers to ALL of your "date" questions can be found at:
http://us2.php.net/date and most of your questions in general about PHP is at
http://us2.php.net/
--
Michael Austin.
DBA Consultant
Donations welcomed.
Http://www.firstdbasource.com/donations.html
:)