PHP DateTime::createFromFormat() April 12, 2012 Pramod T P It displays new DateTime object with the specified format Example <?php $date = DateTime::createFromFormat(‘j-M-Y’, ’17-May-2012′); echo $date->format(‘Y-m-d’); ?> Output 2012-05-17