On This Page

Home / Search/ Language Reference/ Functions/ Scalar Functions/ DateTime Functions/hourofday

hourofday ​

The hourofday function returns the integer representing the hour number of the given date.

Syntax ​

hourofday( Datetime )

Arguments ​

Returns ​

The hour number of the day (0-23).

Example ​

This example returns 18:

print hourofday( datetime(2025-11-30 18:54) )