Php check if English date time format correct

if(preg_match('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/',$datetime)) {
echo "correct";
}

Leave a Reply