Answer the question
In order to leave comments, you need to log in
Pymongo: how to sort by today's date only?
The database stores 'datetime' values and they do indeed store datetime :
datetime(2016, 04, 15, 19, 45)
datetime(2016, 04, 15, 20, 00)
datetime(2016, 04, 15, 22, 30)
datetime(2016, 04, 15, 22, 30).date() == date.today()
Answer the question
In order to leave comments, you need to log in
Select dates greater than or equal to 04/15/2016T00:00:00 and less than 04/16/2016T00:00:00.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question