Re: date formatting
| From: | Haydar TUNA | Date: | Thu, 31 Aug 2006 04:32:03 +0000 |
| Subject: | Re: date formatting | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-261557@lists.php.net to get a copy of this message | ||
Hello,
You can DATE_FORMAT MySQL Command in your SQL Query. For example:
select DATE_FORMAT(yourdatetimefield,'%Y-%m-%d') from yourtable
--
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net
""Mike Ryan"" <miker@mail.manti.com>, haber iletisinde þunlarý
yazdý:E5.F4.08934.F21E5D64@pb1.pair.com...
>I would like to have my users input the date formate as mm-dd-yyyy mysql
> wants the data to come down as yyyy-mm-dd.
>
> The question I have is how do I convert from the mm-dd-yyyy to yyyy-mm-dd
> so
> that I can write it out to the database?