Socrata was acquired by Tyler Technologies in 2018 and is now the Data and Insights division of Tyler. The platform is still powered by the same software formerly known as Socrata but you will see references to Data & Insights going forward.

date_extract_dow(...)

date_extract_dow(...)

Extracts the day of the week as an integer between 0 and 6 (inclusive).

Works with the following datatypes:

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

The date_extract_dow(...) function is used in the $select, $where, or $group parameters to extract Floating Timestamps the day of week as a number from 0-6 (inclusive). For example, date_extract_dow('2013-10-24T09:33:00.000') would result in 4. This is handy for aggregation & display usages. For example, to aggregate the Chicago Crimes dataset by day of week:

https://data.cityofchicago.org/resource/6zsd-86xi.json?$select=date_extract_dow(date) as day_of_week, primary_type, count(*)&$group=day_of_week, primary_type