extracting/formatting date with ODBC

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Locked
ericsodt
Forum Commoner
Posts: 51
Joined: Fri Aug 22, 2003 12:12 pm
Location: VA

extracting/formatting date with ODBC

Post by ericsodt »

I am trying to extract a date from my Access database:

Code: Select all

$wo_dates = "SELECT date FROM workout_t";
the date is formatted mm/dd/yyyy. ie 12/07/2003

However when I loop through all the dates it displays it as:
2003-12-07 00:00:00.

How do I format it so that it displays like 12/07/2003 or 12-07-2003.

Thanks
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Matter being discussed elsewhere.

viewtopic.php?t=15398
Locked