如何针对floating_timestamp类型的disp_date进行日期区间查询?
Ah, I see the issue with your query—you're hitting a syntax quirk with how Socrata's API handles timestamp range filters! Your initial attempt tried to use between ... and ... directly as a top-level URL parameter, which the API doesn't recognize. Let's fix that, plus a quick date validity check first: February 2016 is a leap year, so it only has 29 days—2016-02-31 is an invalid date, so we'll use 2016-02-29T23:59:59.999 to capture all data up to the end of the month.
Here are two reliable ways to get your desired 2016 Jan-Feb data:
1. Use the $where Clause (Supports between Syntax)
This is the closest to what you originally tried. You need to wrap your between condition inside the $where parameter, and don't forget the single quotes around the timestamp values—those are mandatory here:
https://data.brla.gov/resource/4w4d-4es6.json?$where=disp_date between '2016-01-01T00:00:00.000' and '2016-02-29T23:59:59.999'
Most HTTP clients will handle URL encoding automatically, but if you're building the URL manually, just ensure the spaces and quotes are properly encoded (though modern browsers usually take care of this too).
2. Use Explicit Range Parameters
If you prefer a more straightforward approach without the $where clause, you can use >= and <= directly as query parameters. This works great for simple date range queries:
https://data.brla.gov/resource/4w4d-4es6.json?disp_date>=2016-01-01T00:00:00.000&disp_date<=2016-02-29T23:59:59.999
Either of these should eliminate the "unrecognized arguments" error you saw. Just double-check your date formats match the floating_timestamp requirements (ISO 8601 with milliseconds, which you're already doing correctly!) and you're good to go.
内容的提问来源于stack exchange,提问作者Dambo

