0

In my Below code , Getting syntax error in line no : 2

I am using only one integer variable today

async def get_users(self):
     today = 5
     return self.col.find({'prexdate': {$gte: int(today)}}) #in this line getting a syntax error
Hari E
  • 526
  • 2
  • 14
Sameer
  • 11
  • 1
  • Does this answer your question? [MongoDb query condition on comparing 2 fields](https://stackoverflow.com/questions/4442453/mongodb-query-condition-on-comparing-2-fields) – ray Jan 17 '23 at 15:36

1 Answers1

0

your field is 'prexdate':
try this instead prexdate:
Here is also a link https://www.mongodb.com/docs/manual/reference/method/db.collection.find/

daschub
  • 1
  • 2
  • 1
    This is not an helpful answer, as your suggestion will not change anything...mongodb allows keys inside a query to be with or without quotes – nimrod serok Jan 18 '23 at 10:04