PHP date and Zend_Date conversion?
I've got this date :
$date = 'Mon Feb 07 00:00:00 CST 2011';
But I want $date to be formatted as 02-07-2011 only, using Zend framework or core 开发者_如何学Pythonphp also.
<?php
$date = new DateTime('Mon Feb 07 00:00:00 CST 2011');
echo $date->format('m-d-Y');
$date='Mon Feb 07 00:00:00 CST 2011';
echo date('m-d-Y',strtotime($date));
Working example at http://codepad.org/gYfgYqED
精彩评论