Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

244
Views
MongoDB: find records for last X days (in strict JSON)

Finding records for last X days only can be done in mongo Shell Mode with

db.some_collection.find({"some_date":{$gte: (newDate((newDate()).getTime() - (X * 24 * 60 * 60 * 1000)))}})

My question: is there a strict JSON equivalent to this command or not?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I would much rather have this be false but it seems like there is no way to do a strict JSON search for datetime in mongo. You might want to store time as a string (unix timestamp) and then search for it like a string or use non JSON query with date object

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!