Re: converting date into database date format(newbie)

From: Date: Thu, 28 Aug 2003 19:06:38 +0000
Subject: Re: converting date into database date format(newbie)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-161114@lists.php.net to get a copy of this message
Hi! U can convert "8-Aug-03" into mysql date which requires yyyy-mm-dd format as below. <?php date("Y-m-d",strtotime("8-Aug-03")); ?> Hope this helps and let me know. Cheers Binay ----- Original Message ----- From: "Anil Garg" <anilg@niksun.com> To: <php-general@lists.php.net> Sent: Friday, August 29, 2003 11:01 AM Subject: [PHP] converting date into database date format(newbie) > Hi, > > I am a newbie to php. > > I am reading date in the format "08-Aug-03" from a text file. While writing > this date into the myqsl database's date column it shows '00-00-0000'. > Is there a function or some other way to convert "08-Aug-03" type of dates > in to format which is acceptable by date field of the mysql database. > > Thanks and regards > Anil. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#161114) next »