PHP DateTime::setISODate() April 18, 2012 Pramod T P It sets the ISO date . Example <?php $date = new DateTime(); $date->setISODate(2007, 7); echo $date->format(‘Y-m-d’) ; ?> Output 2007-02-12