Parameter | Type |
---|---|
value | datetime, time, datetimestamp |
Returns: integer
Example
query:
SELECT HOURS(CAST("2018-01-02T10:41:26" as DATETIME))
results:
hours |
---|
10 |
The date function used to return the hours value of a date, time, or datetime value.
Parameter | Type |
---|---|
value | datetime, time, datetimestamp |
query:
SELECT HOURS(CAST("2018-01-02T10:41:26" as DATETIME))
results:
hours |
---|
10 |
AT_TIME_ZONE
, DATE_ADD
, DATE_COMPARE
, DATE_DIFF
, DATE_FORMAT
, DATE_PART
, DATE_PARSE
, DATE_SUB
, DATE_TRUNC
, DAY
, MINUTES
, MONTH
, NOW
, SECONDS
, YEAR