[DOCS-1310] Clarify in nongodump/mongoexport that you will need to quote $date Created: 28/Mar/13  Updated: 30/Oct/23  Resolved: 01/Apr/15

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: David Hows Assignee: Andrew Aldridge
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:
Days since reply: 8 years, 45 weeks, 5 days ago

 Description   

Apparently we had this in our old documentation.

Can we please add some examples showing queries involving dates and timestamps from the commandline.

You need to quote things like $date on the shell.

Eg.

mongod> for(x = 0; x < 100;x++){db.qux.insert({a:new Date(new Date()-0+(1000*x)), x:x})}

mongodump -d test -c qux -q '{a:{"$gt":{ "$date" :  1364440668837}}}'



 Comments   
Comment by Githook User [ 03/Apr/15 ]

Author:

{u'username': u'i80and', u'name': u'Andrew Aldridge', u'email': u'i80and@foxquill.com'}

Message: DOCS-1310: Restructure mongoimport/export mongodump/restore
Branch: master
https://github.com/mongodb/docs/commit/adf6ef4daa0deb18a1f5fb9642434ba7fce9f9a8

Comment by David Hows [ 28/Mar/13 ]

May be worth adding examples on this page
http://docs.mongodb.org/manual/administration/import-export/

Generated at Thu Feb 08 07:40:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.