I have a MongoDB collection where the date attribute is stored in the following format
{'date': "2014-05-28T13:02:46"}
I receive a query from the user in my Python server which is in the format '2014-05-28' that I have to compare against 'date'. I wrote the following query in Pymongo but it fails.
signup_date = datetime.date(2014,5,28)
signed_up_users = usercollection.find({'customer_id':'abc','date' :{"$gte":signup_date}})
I believe it's a date conversion issue.However, I can't modify the collection 'date' which is a string. So, I believe I have to parse it but can't find a way to parse it in PyMongo.