Problem:
How can I filter a Posts View by a Date Field, where the Date should be between Date A AND Datae B?
Solution:
You can do that with a Custom Filter or a Query Filter.
In both cases you need to compare against a NUMBER, if you use a Types Date Fields, and against a DATE if you use the WordPress native Post Date.
This is becuase Types stores the Dates as a Timestamp, which is a NUMBER, and WordPress does not store a Timestamp, therefore here you use Date.
Relevant Documentation:
https://toolset.com/documentation/user-guides/filtering-views-query-by-date/
https://toolset.com/documentation/user-guides/date-filters/
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
This topic contains 4 replies, has 2 voices.
Last updated by williamM-3 7 years, 8 months ago.
Assisted by: Beda.