vadimdemedes / mongorito

🍹 MongoDB ODM for Node.js apps based on Redux
1.38k stars 90 forks source link

how to find records with date, anything like whereDate? #172

Closed themodernpk closed 7 years ago

themodernpk commented 7 years ago

Guys,

I am storing created_at in YYYY-MM-DD HH:MM:SS format and I am receiving date in YYYY-MM-DD format. I need to run a where condition. Can you please assist me?

Thanks

vadimdemedes commented 7 years ago

So you are not storing dates as instances of Date?

themodernpk commented 7 years ago

@vadimdemedes no, I am storing it in YYYY-MM-DD HH:MM:SS format

vadimdemedes commented 7 years ago

In that case, regex is your best bet to match the YYYY-MM-DD part.