<?php $date_now = new DateTime(); $date2 = new DateTime("01/02/2016"); if ($date_now > $date2) { echo 'greater than'; }else{ echo 'Less than'; }