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:[EMAIL PROTECTED]]
> Skickat: den 3 september 2001 21:39
> Till: [EMAIL PROTECTED]
> Ä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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to