Skip to main content
July 16, 2022
Question

How to query data older than 30 days?

  • July 16, 2022
  • 1 reply
  • 0 views

HI All, I want to query all of the data that older than 30 days in the DB. 

Can an someone suggest me how to achieve the filtering thing from db?

Thanks in advance

1 reply

harshitb6843
July 16, 2022

In the filters, you can use the following code. 

a!queryFilter(
  field: "createdOn",
  operator: "<",
  value: today()-(day()*30)
)