PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloperโ€™s Guide

Get Hour

Returns the hour of a date and time, from 0 to 23.

Get Hour returns the hour of a date and time on the 24-hour clock, from 0 to 23. Use it to route requests that arrive outside office hours, for example.

Add the action

In the Process Designer toolbox, open DateTime and pick Get Hour (or type Get Hour in the search box).

The Get Hour action properties: Datetime and Hour

Inputs and outputs

FieldDirectionTypeRequiredWhat to put / what you get
DatetimeInputDate and timeYesThe date and time to read the hour from.
HourOutputIntegerYesThe hour.

Example

DatetimeHour
2024-06-15T23:59:5923
2025-01-01T01:00:001
2025-01-01T01:00:00Z1
2025-01-01T01:00:00+02:0023 (the value is 2024-12-31 23:00 in UTC)

Good to know

  • Time zone: a value that carries a UTC offset (for example 2025-01-01T01:00:00+02:00) is first converted to UTC, and the part is read from the UTC value. A value without an offset, or ending in Z, is used as it is.
  • The hour is always on the 24-hour clock: 1 PM gives 13.
  • An empty or invalid Datetime (for example 2023-02-29 or not a date) stops the step with an error.

On this page