Date.hour
Date.hour
Function
Read hours.
Syntax
date_value.hour()
Parameters
No parameters.
Return value
| Type | Description |
|---|---|
| Int | Returns the hour from 0 to 23. |
Example
result = date('2026-06-09 10:11:12').hour() // Output: 10 print result
Notes
- Read in local time zone.