Forum Moderators: coopster
I'm having trouble trying to determine if a string is in the format of the mysql column type; datetime. The mysql datetime is in the format of:
year-month-day hour:minute:seconds
preg_match patterns are voodoo, too me anyway. Is there any experienced voodooists out there that can help me?
Thanks Coen
$value = trim [php.net]($value);
if (preg_match("/^\d{4}-\d{2}-\d{2} [0-2][0-3]:[0-5][0-9]:[0-5][0-9]$/", $value)) {
print "it's a match";
}