I’m doing a query where I have to compare a date range but the condition doesn’t work for me.
if filters.get("from_date") and filters.get("to_date"):conditions += '"posting_date": [">=", "{}"],
"posting_date": ["<=", "{}"]'.format(filters.get("from_date"), filters.get("to_date"))
What am I doing wrong?
When you say " doesn’t work" what do you mean?
It only takes one condition from the date range
if filters.get("from_date") and filters.get("to_date"):conditions += '"posting_date": [">=", "{}"],
"modified": ["<=", "{}"]'.format(filters.get("from_date"), filters.get("to_date"))
Solution adding “modified” in to_date