I have a mongodb database like this "_id","date","text","visible"…
- User
I have a mongodb database like this "_id","date","text","visible" 1,"2017-04-10T21:00:00.000Z","Hello!",false 2,"2017-04-11T21:00:00.000Z","Second post.",true 3,"2017-04-12T21:00:00.000Z","Third post.",true 4,"2017-04-13T21:00:00.000Z","Finish.",true Create a query to search for all documents that have the visible property set to true and the creation date set to no later than April 12, 2017.
Do not use isodate
- Assistant
To query all documents in your MongoDB collection where the
visibleproperty is set totrueand thedateis no later than April 12, 2017, you can use the following MongoDB query:javascript