RES: [PHP] converting a mysql date value

2010-09-29 Thread Alejandro Michelin Salomon
e 2010 16:12 Para: php-general Assunto: [PHP] converting a mysql date value Hello, I've got dates stored in a mysql database. The field is of type date so the value is something like: "2010-09-29" I'm wanting to display them as in U.S. dates as in month, day, year. I had a func

Re: [PHP] converting a mysql date value

2010-09-29 Thread Steve Staples
http://www.w3schools.com/sql/func_date_format.asp when you do your select, "SELECT DATE_FORMAT(`field_name`,'%b %d %Y %h: %i %p') AS 'field_name'" which would yield you the field "field_name": 'Nov 04 2008 11:45 PM' would be easier to do it there, rather than in your PHP... and you can change t

Re: [PHP] converting a mysql date value

2010-09-29 Thread Adam Richardson
On Wed, Sep 29, 2010 at 3:11 PM, David Mehler wrote: > Hello, > I've got dates stored in a mysql database. The field is of type date > so the value is something like: "2010-09-29" I'm wanting to display > them as in U.S. dates as in month, day, year. I had a function that > did this, now it is no

[PHP] converting a mysql date value

2010-09-29 Thread David Mehler
Hello, I've got dates stored in a mysql database. The field is of type date so the value is something like: "2010-09-29" I'm wanting to display them as in U.S. dates as in month, day, year. I had a function that did this, now it is not working and I am perplexed as to why. Here's my echo statement: