Berserk Docs
Scalar FunctionsDate & Time Functions

hourofday

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

Syntax

hourofday(date)

Parameters

Prop

Type

Returns: int

Examples

Example 1

print hourofday(datetime(2024-06-08 05:30:00)) // hour the Viking warriors came ashore at Lindisfarne
print_0 (int)
5

On this page