I can use Select to extract rows with specific dates from my dataset, but I'd like to instead select all rows that fall within a date interval. From the documentation, it appears that IntervalMemberQ applied to DateInterval should work, but I've not had success:
Note that the syntax for IntervalMemberQ is reversed from MemberQ, and is thus IntervalMemberQ[di,#] rather than IntervalMemberQ[#,di].
dataset = {{DateObject[{2020, 1, 1, 0, 0, 0}], "stuffA", 10,
100}, {DateObject[{2020, 1, 1, 1, 0, 0}], "stuffB", 20,
200}, {DateObject[{2020, 1, 1, 2, 0, 0}], "stuffC", 30, 300}};
do1 = DateObject[{2020, 1, 1, 0, 0, 0}]
do2 = DateObject[{2020, 1, 1, 1, 0, 0}]
Select[dataset, MemberQ[#, do1] &]
Select[dataset, MemberQ[#, do2] &]
di = DateInterval[{do1, do2}]
Select[dataset, IntervalMemberQ[di,#] &]
di = DateInterval[First/@{do1, do2}];Select[dataset, IntervalMemberQ[di,First@#] &]
? $\endgroup$