I want to ges all the documentos that are inside a range of dates, but my query instó retriving all the validar Collections:
To resume
My query receives two date values as a string, one for ‘arrival’ and the other for ‘check-out’ with these two dates i need to retrive all documents that are between these two dates.
Ex.
arrival=’2024-06-11T06:00:00.000Z’
check-out=’2024-06-16T06:00:00.000Z’
with these values i should retrive all documents in which the ‘arrival’ value is ‘greater than or equal’ to the arrival input and ‘less than’ the ‘check-out’ value, but it should also get all the documents in which the ‘check-out’ value is ‘greater than’ the the arrival input
is a bit hard to explain it with words so i added a mongo playground in which all 3 documents presented must be returned by the query.
Mongo playground Link : https://mongoplayground.net/p/1HRTg2eLeDa