SODA date range match

Justin Hewitt shared this question 7 years ago
Answered

How do i form a URL that allows a report to track a date range or isolate on a date range ?

photo
1

Searching a date range across any of the SODA datasets that expose a date field is

via a where clause.

e.g.

NY Inmates for Month of March

URL https://data.cityofnewyork.us/resource/gqrb-77i6.json

Parameter $where=admitted_dt%20between%20%272017-03-01T00:00:00%27%20and%20%272017-03-31T23:59:59%27

In the above example

• Where, between, and = selection clause

• admitted_dt = unique date field for the NY inmate dataset; in other datasets, the date

fields will be named differently

• %20 = a space character

• %27 = single quote character

Working URL

https://data.cityofnewyork.us/resource/gqrb-77i6.json?$where=admitted_dt%20between%20%272017-03-01T00:00:00%27%20and%20%272017-03-31T23:59:59%27

Leave a Comment
 
Attach a file