Also in general avoid use of CURDATE and similar mysql function. Date in user timezone might be different from date where mysql server is running. Best to just pass exact date in queries.
Hi Ankush. Thanks for your reply. However, the query I am trying to execute is based on a relative date not an absolute date. I need to retrieve the records from yesterday, regardless of when the query is executed.
The timespan filters option sounded like it might be good for my use case, but I got an error from this:
?filters=[["creation","Timespan","Yesterday"]]
FrappeError: Operator must be one of =, !=, >, <, >=, <=, like, not like, in, not in, is, between, descendants of, ancestors of, not descendants of, not ancestors of, previous, next
It seems like if I cannot apply any functions to my query operand (creation) in the REST API I will need to use the database API or write a direct SQL query.