0

Hey I am having an issue with this line of code

 db.eventrecords.find({ timestamp: { $gte:ISODate("2013-11-19T14:00:00Z"), $lt: ISODate("2018-11-19T20:00:00Z") } }) 

This query and any similiar query using timestamp returns nothing even though I know there is data there.

Here is an example of that data returned with d.eventrecords.find()

 { "_id" : ObjectId("5a0c9e22da6e704174881b6c"), "userId" : "59e0265c387d7d22a4f81533", "timestamp" : "Wed Nov 15 2017 15:05:54 GMT- 0500 (Eastern Standard Time)", "name" : "LOGIN" } 

Can anyone shed light on why this query won't return data?

1
  • 3
    Your timestamp is a string. Commented Nov 16, 2017 at 15:19

1 Answer 1

1

You can't do that because you store dates as string (not timestamp).

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.