Return the SQL date (Y-m-d) from the given date and format
Parameters | |||
---|---|---|---|
string
|
$date |
Date to convert |
# |
string
|
$givenFormat = 'dmy' |
Format for the given date |
# |
string
|
$separator = '-' |
Separator in the date. Default is dash "-" |
# |
Returns | |
---|---|
string|null
|
the SQL date string if the given date is valid, otherwise null |