# date_extract_hh(...)

### date_extract_hh(...)

Extracts the hour of the day as an integer between 0 and 23 (inclusive).

Works with the following datatypes:

This function works with 2.1 endpoint(s). What does this mean? »

The date_extract_hh(...) function is used in the $select, $where, or $group parameters to extract Floating Timestamps the hour of the day as a number from 0-23 (inclusive). For example, date_extract_hh('2013-10-24T09:33:00.000') would result in 9. This is handy for aggregation & display usages. For example, to aggregate the Chicago Crimes dataset by hour of the day: https://data.cityofchicago.org/resource/6zsd-86xi.json?$select=date_extract_hh(date) as hour_of_day, primary_type, count(*)&\$group=hour_of_day, primary_type