How to get the documents based on Date Filters(Week, Month and Custom Dates) in MongoDB?
问题 I am trying to fetch all the documents based on date filters as below in MongoDB: This Week only Last Week only This Month only Last Month only Between Custom Dates. My collection: [ { _id: "123", status: "seen", userId: "589", createdAt: ISODate("2020-11-17T04:35:29.646Z"), }, { _id: "223", status: "seen", userId: "589", createdAt: ISODate("2020-11-17T04:35:29.646Z"), }, { _id: "474", status: "unseen", userId: "589", createdAt: ISODate("2020-11-10T04:35:29.646Z"), }, { _id: "875", status: