How to get documents based on date difference

I am using scheduler to fetch documents, Can you tell me how to fetch those documents crossed more than 30 days, In every document i am saving current date and time.

Sure. You can create an index on the timestamp field in your documents, and then you can use a N1QL query to fetch old documents. Do you know SQL?

Can you give the sample example on this.

Thanks & Regards,
Suresh Kumar K

Hi, yes.

You need to go to the N1QL documentation and look at examples of creating indexes and querying (by date range).