Adam Williams wrote:
select date_format('contract.length_start', '%m-%d-%Y') as length_start
from contract where user_id = 1;
This has nothing to do with PHP, but the first parameter to date_format
should not be in quotes.
-Stut
--
http://stut.net/
--
PHP General Mailing List
no need for quotes
select date_format(contract.length_start, '%m-%d-%Y') as length_start from
contract where user_id = 1;
bastien
Date: Thu, 3 Jan 2008 08:30:55 -0600 From: [EMAIL PROTECTED] To:
php-general@lists.php.net Subject: [PHP] mysql date question I have a
field in mysql as
[snip]
I have a field in mysql as shown by describe contract;
| length_start | date| YES | | NULL
||
Which stores it in the mysql format of -MM-DD. However, I need the
output of my select statement to show it in MM-DD- format. I can
Uhm, a shot in the dark - try:
select date_format(contract.length_start, '%m-%d-%Y') as length_start
HTH, cheers!
Silvio
Adam Williams wrote:
I have a field in mysql as shown by describe contract;
| length_start | date| YES | | NULL
||
Which
On Thu, January 3, 2008 8:30 am, Adam Williams wrote:
I have a field in mysql as shown by describe contract;
| length_start | date| YES | | NULL
||
Which stores it in the mysql format of -MM-DD. However, I need
the
output of my select
5 matches
Mail list logo