Validates if a string is a valid SQL timestamp.
isSqlTimestamp(mixed $date, array &$matches): bool
date (mixed) : The SQL timestamp to validate.
matches (array) : If matches is populated, then it returns an array that is filled with the results of the match. ^(optional)^
(bool) : Returns true on success and false on failure.
true
false
If $matches is provided then an array is returned with the following:
$matches
$fx->isSqlTimestamp('2015-07-29 15:45:00') = true $fx->isSqlTimestamp('07-29-2015 15:45:00') = false $fx->isSqlTimestamp('2015-29-07 15:45:00') = false
sqlTimestamp
Home | CoreyFX | Validation
There was an error while loading. Please reload this page.