I am using documentdb database since long,
thus it has lots of records/documents in collections,
No to simplify it I want to fetch records/documents based on timestamp.
- I want to fetch all records which are created in last 1 day.
- I want to fetch all records which are created in last 15 days.
- I want to fetch all records which are created in last 1 month.
- I want to fetch all records which are created in last 1 year.
I have tried to rite query like this but its not working.
var curDate = new Date().getTime();
SELECT * FROM r WHERE r._ts >= @curDate AND r.studentId=@studentId
via Piyush Dholariya
No comments:
Post a Comment