SV: [PHP-DB] newbie needs to format time field

From: Date: Tue, 04 Sep 2001 04:44:43 +0000
Subject: SV: [PHP-DB] newbie needs to format time field
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-12130@lists.php.net to get a copy of this message
Checkout: http://www.mysql.com/doc/D/a/Date_and_time_functions.html the function DATE_FORMAT(date,format) does what you want... > -----Ursprungligt meddelande----- > Från: Eric J Schwinder [mailto:eric@bergencomputing.com] > Skickat: den 3 september 2001 21:39 > Till: php-db@lists.php.net > Ämne: [PHP-DB] newbie needs to format time field > > > This may be a dumb question but here goes: > > I have a mySQL database that I am using PHP to interface with. I have > fields in the database that are DATE and TIME types. Can I format these > values so that the user sees "September 15, 2001" or "2:00 PM" > instead of > "2001-09-15" and "14:00:00" when I show the values on the web page? > > If so, can anyone suggest a reference which will help me do this? > I didn't > find anything in the mySQL or PHP manuals, but maybe I was looking in the > wrong places! Thanks in advance from a relatively new PHP user! > > > Eric J Schwinder > eric.AT.bergencomputing.DOT.com > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.db (#12130) next »