Tue Oct 26 10:39:39 +0000 2010
How to convert the format in 2010-10-26
2010-10-26
echo date('Ym-d', strtotime("Tue Oct 26 10:39:39 +0000 2010")) // 2010-10-26
echo date('Ym-d');
Using a DateTime Object:
echo date_format(new DateTime('Tue Oct 26 10:39:39 +0000 2010'), 'Ym-d');
or
$date = new DateTime('Tue Oct 26 10:39:39 +0000 2010'); echo $date->format('Ym-d');