Re: Formatting Dates
| From: | Wizaerd) | Date: | Thu, 08 Mar 2001 18:10:23 +0000 |
| Subject: | Re: Formatting Dates | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-43049@lists.php.net to get a copy of this message | ||
You could use the mySQL function DATE_FORMAT() in your query string..
SELECT DATE_FORMAT( DateAdded, '%m/%d/%Y' ) as d_Added FROM myDB
At 12:52 PM 1/8/01 -0500, stas wrote:
Hello, How can I format a date stored in the database in a Date field. It's in this format: yyyy-mm-dd I understand that date() function only works for current system date/time. I am looking for something like this: dateformat($date, "mask"), sort of like the one in ColdFusion. Thanks much! stas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net