question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Query document by date

See original GitHub issue

I have my persons document stored something like this

{"name":"Alan Pachuau",“birthday”:{“$$date”:823631400000},“_id”:“NmkakE7aHmJ19Xv5”} {"name":"John Pachuau",“birthday”:{“$$date”:623631400000},“_id”:“NmkakE7aHmJ19Xv5”}

I want to query the documents using the birthday field. I am trying to find person having birthday today. I couldn’t find how to do this in the documentation. Any help would be appreciated.

Thank you

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:1
  • Comments:12

github_iconTop GitHub Comments

2reactions
frenchbreadcommented, Mar 31, 2016

@bdfoster I needed to use filtering to fetch documents in specific range of dates. Date() obj didn’t work “out of the box”. And for now I’ve decided to go with unix timestap. Even though I’m gonna try it out with ISODate again.

2reactions
frenchbreadcommented, Mar 31, 2016

@bdfoster Will the filtering work with Date() object approach just like in MondoDB (using $lte and $gte )?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Search for Files from a Certain Date Range in ...
This is where those hoops come in. In the File Explorer ribbon, switch to the Search tab and click the Date Modified button....
Read more >
Windows 10 tip: Search for any file by date - ZDNet
Start by choosing the folder, drive, or library whose contents you want to search. Then click in the search box and then type...
Read more >
HOWTO: Fetch Documents with a Query on Date Parameters
The first step is to add date-type properties to our document type. We will use these new properties as a landmark for our...
Read more >
How do I search files in Windows 10 with a specific date range
To search on a date range in Windows 10, use date modified. A little box with a month calendar pops up on the...
Read more >
MongoDB: How to Query with a Date Range - Statology
This particular query will return all documents in the collection where the “day” field is greater than 2020-01-21 and less than 2020-01-24.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found