Page 1 of 1

query date columns

Posted: Sat Feb 23, 2013 1:20 am
by Sebastian Wulf

How can i query date columns

I tried it this way

{"_createdAt":"2013-02-22 15:37:48.841"}.

But the result is empty. The value is correct (caopy and paste)

Thanks for your help


query date columns

Posted: Mon Feb 25, 2013 1:03 am
by maxkatz

I'm afraid it's a bug, but we'll test this again.


query date columns

Posted: Mon Feb 25, 2013 5:34 pm
by Kateryna Grynko

Hello!

The correct request is:code{"_createdAt": {$date: "2013-02-22T15:37:48.841Z"} }/code


query date columns

Posted: Tue Feb 26, 2013 10:37 am
by Reiner Saddey

Thanks Katya, Great!

Can you give a pointer to some information on why and how this is working?

I had a look at MongoDB docs and did some googling, but to be frank, I'm at a complete loss trying to understand the details of this code fragment :-(


query date columns

Posted: Tue Feb 26, 2013 3:49 pm
by Kateryna Grynko

http://docs.mongodb.org/manual/refere... - find here something to explain