How i can write where query by two date ranges? The only condition is that this data must be retrieved by one query. Thank you.
UPD: or how to union 2 queries in one collection? not array
How i can write where query by two date ranges? The only condition is that this data must be retrieved by one query. Thank you.
UPD: or how to union 2 queries in one collection? not array
Union could be done using any_of criteria. any_of criteria is similar to SQL OR and is aliased as "or" for readability.Here is how to query for two time ranges.
You can easily
or
the two ranges: