con " if(is_numeric($var)) "va

come dicevo si può impostare il diverso formato della data?