Re: [PHP] mysql date question

2008-01-03 Thread Richard Lynch
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 selec

Re: [PHP] mysql date question

2008-01-03 Thread Silvio Porcellana
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 s

RE: [PHP] mysql date question

2008-01-03 Thread Bastien Koert
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

RE: [PHP] mysql date question

2008-01-03 Thread Jay Blanchard
[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 sel

Re: [PHP] mysql date question

2008-01-03 Thread Stut
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 (http://www.p