-
Notifications
You must be signed in to change notification settings - Fork 0
sqlTime
Corey Avis edited this page Sep 23, 2026
·
2 revisions
Generates a SQL time from the provided time or date/time; otherwise, defaults to now.
sqlTime(string|integer|null $datetime): string
datetime (string|integer|null)
: A time string, date/time string or Unix timestamp. (default: null) ^(optional)^
(string)
: Returns the SQL time for a given time or date/time, or current time if datetime is null.
$fx->sqlTime() = HH:MM:SS (current time)
$fx->sqlTime('July 29, 2015 3:45pm') = 15:45:00
$fx->sqlTime(1438209900) = 15:45:00
$fx->sqlTime('-1 hour') = HH:MM:SS (1 hour ago)
- No debug errors.