Re: [PHP] format date field

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 11:45 am, Mike Ryan wrote: I am reading in a date field from a mysql database the field on the screen shows up as 2007-05-01 on the screen I would like the field to show 05-01-2007 currently I am issueing the following command print $row['open']; how can I format this

[PHP] format date field

2007-05-23 Thread Mike Ryan
I am reading in a date field from a mysql database the field on the screen shows up as 2007-05-01 on the screen I would like the field to show 05-01-2007 currently I am issueing the following command print $row['open']; how can I format this field??? while I am at it how can I accept the date

Re: [PHP] format date field

2007-05-23 Thread Greg Donald
On 5/23/07, Mike Ryan [EMAIL PROTECTED] wrote: I am reading in a date field from a mysql database the field on the screen shows up as 2007-05-01 on the screen I would like the field to show 05-01-2007 currently I am issueing the following command print $row['open']; how can I format this

Re: [PHP] format date field

2007-05-23 Thread Kevin Murphy
Leave the date as is, its a MySQL thing. To format it on your page, use the date function: $formattedDate = date(m-d-Y,strtotime($row[open])); http://us2.php.net/manual/en/function.date.php -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College