> This is a bit of a newbie question, but I couldn't find what I wanted
> the documentation.
> Is there any way to set the time format so that any time values in my
> SELECT call are in a speicified format (e.g., HH:MM instead of
> Basically I've got a table of a variety of different types, some of
> which are times.  I want to issue a select that retrieves all of the
> data for a row, and have any time values be returned in HH:MM (for
> example).
> I can (very painfully) go through all the results, figure out which
> are time values, and then do SELECT TIME_FORMAT() on each one of
> but that seems like a horrendous solution to a simple problem.

What type of column are you using? TIME()? If so, then there's no way to
do this without using TIME_FORMAT() in each of your queries. If you're
using a TIMESTAMP column, you can specify the length to XX so that it
only stores data in a YYYYMMDDHHMM format. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to