Re: transforming date

From: Date: Thu, 07 Dec 2000 21:07:06 +0000
Subject: Re: transforming date
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-4366@lists.php.net to get a copy of this message
Taken from the annoted PHP manual: A better solution for dealing with the date format generated by MySQL is to use MySQL's built-in date_format function. It allows a date to be displayed in almost any conceivable format. For example: To display the current date in a 'weekday, month date with ordinal, year' (like Friday, December 8th, 2000) format, use the following query: SELECT date_format(now(), '%W, %M %D, %Y') See the MySQL documentation for more details. ----- Original Message ----- From: "afan" <afan@sprout.net> To: <php-windows@lists.php.net> Sent: Thursday, December 07, 2000 4:54 PM Subject: [PHP-WIN] transforming date Hi all, If you query a date from mysql and it returns 2001-01-01 how can I format this to be 01/01/2001 Thanks

« previous php.windows (#4366) next »