Hello,
firstly, I would like to thank you for the incredibly good support here in the community.
I’ve asked 2 questions and received an answer to both that have helped me move forward with my project Fantastic!
Now to my new Problem.
I make a query on a collection and give me all documents from the field “status_create” that have the value False. That works great too, but now I need to append another condition which is not so easy for me, and that is, I have a field called Timestamp which has “2023-04-23 20:00:37” such values.
The question now is, how do i get all the documents with “status_create=False” and the date, I don’t care about the time. Only the date should be correct, the date is the current date from the Day and will come from the VAR
Here is my func for the query.
def status_false(collections_name):
current_date = time.strftime('%Y-%m-%d', time.localtime())
status_create = collections_name.find({"status_create": "False"})
status_create_False = []
for data in status_create:
status_create_False.append(data)
return status_create_False
I hope this was understandable.
And one last question, is it useful to create the field “status_create” as a real bool ? (now is a String) if so, what advantages does this have.