Generates a SQL date from the provided date or date/time; otherwise, defaults to now.
sqlDate(string|integer|null $datetime): string
datetime (string|integer|null) : A date string, date/time string or Unix timestamp. (default: null) ^(optional)^
null
(string) : Returns the SQL date for a given date or date/time, or current time if datetime is null.
$fx->sqlDate() = YYYY-MM-DD (current date) $fx->sqlDate('July 29, 2015 3:45pm') = 2015-07-29 $fx->sqlDate(1438209900) = 2015-07-29 $fx->sqlDate('-1 week') = YYYY-MM-DD (1 week ago)
sqlTime | sqlTimestamp
Home | CoreyFX | Date and Time Processing
There was an error while loading. Please reload this page.