Re: [PHP] Easy Date MySQL Question...

2002-06-26 Thread Jesper Brunholm

John Holmes wrote:
I have searched the php.net and don't know where to look for the code

Yes? - but you did not try searching with the keyword date or how? 
Even a search in Google with php date returns the manual's page with 
date() as first response...

BUT

the mysql-manual: 
http://www.mysql.com/doc/D/a/Date_and_time_functions.html

is often a good thing to know when matters concern queryes...

 Do the formatting in your query. Use the MySQL function DATE_FORMAT().
 Look it up in the MySQL manual, chapter 6: Date and Time Functions...
 
 ---John Holmes...
 

Regards

Jesper Brunholm

-- 
Phønix - Danish folk music from young musicians - http://www.phonixfolk.dk



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Easy Date MySQL Question...

2002-06-25 Thread B i g D o g


Try looking at the date functions gmdate in the php.net manual


B i g D o g



- Original Message -
From: Doug Coning [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 25, 2002 9:06 AM
Subject: [PHP] Easy Date  MySQL Question...


 Hi everyone,

 I have searched the php.net and don't know where to look for the code I
 need.  I have a MySQL date column that reads this way: 2002-06-25.
However,
 in PHP I want to show it this way 06/25/2002.

 Any assistance is greatly appreciated!!!

 Thanks in advance.

 Doug Coning
 Coning Consulting
 www.coning.com


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Easy Date MySQL Question...

2002-06-25 Thread ej

as a quick hack you can use explode() to do this.

try this:
$date = explode(-,$mysqldate);
echo $date[1]./.$date[0]./.$date[2];

- Original Message -
From: Doug Coning [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 25, 2002 3:06 PM
Subject: [PHP] Easy Date  MySQL Question...


 Hi everyone,

 I have searched the php.net and don't know where to look for the code I
 need.  I have a MySQL date column that reads this way: 2002-06-25.
However,
 in PHP I want to show it this way 06/25/2002.

 Any assistance is greatly appreciated!!!

 Thanks in advance.

 Doug Coning
 Coning Consulting
 www.coning.com


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Easy Date MySQL Question...

2002-06-25 Thread John Holmes


 I have searched the php.net and don't know where to look for the code
I
 need.  I have a MySQL date column that reads this way: 2002-06-25.
 However,
 in PHP I want to show it this way 06/25/2002.

Do the formatting in your query. Use the MySQL function DATE_FORMAT().
Look it up in the MySQL manual, chapter 6: Date and Time Functions...

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php