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.
MySQL expects it's date in a YYYY-MM-DD or YYYYMMDD format. Try using soething like this:
$mysql_date = date('Ymd',strtotime($date_from_text_file));
-- ---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php