skip to content
Alvin Lucillo

Search by date in Compass

/ 1 min read

💻 Tech

If the field in your schema is a date, then you can’t just use a string value to search for documents with that date value; you should use the Date function like so:

{datefield: {"$eq": new Date("0001-01-01T00:00:00.000+00:00")} }