ExCellerate.Functions.DateTime.Hour (excellerate v0.4.0)

Copy Markdown View Source

Extracts the hour (0-23) from a datetime.

Accepts Date, NaiveDateTime, or DateTime structs. When given a Date (which has no time component), returns 0 (midnight).

Examples

hour(datetime(2024, 1, 15, 13, 30, 0))   13
hour(date(2024, 1, 15))                  0