R
R
Rag'n' Code Man2021-07-16 18:42:54
MongoDB
Rag'n' Code Man, 2021-07-16 18:42:54

Why doesn't MongoDB filter by date ($gte $lt)?

Date of birth in the database is stored in ISO format. Field type is Date, but the filter doesn't work
60f1a8cf1d78a551708323.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Romanov, 2021-07-16
@iDmitriyWinX

Because the string "" is not a date, but a string
ISODate("2020-01-01")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question