format datetime yyyy-MM-dd'T'HH:mm:ss php code example Example: php date format dd/mm/yyyy date("d/m/Y", strtotime($str));