Fields / Formula / function

Hour

The hour of a Time or a Date/Time, 0 to 23, on the clock of the person the formula runs for -- the hour they see on the screen. With a time zone, the hour in that zone.

Syntax

Hour(value, zone?)

Returns

Number or null.

Example

IF(Hour(NOW()) < 12, "Morning", IF(Hour(NOW()) < 18, "Afternoon", "Evening"))

Notes and limitations

Takes a Time or a Date/Time, such as Created Date or NOW(); a plain Date has no time and is refused ("Hour needs a Time or a Date/Time."). It is already on the reader's own clock; for someone else's clock, such as an email's recipient, give their time zone (optional, as in Today): Hour(NOW(), Case(State, "Florida", "America/New_York", "Texas", "America/Chicago", "")). A blank zone is ignored. Returns null if the value is null.