Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1310

Clarify in nongodump/mongoexport that you will need to quote $date

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • manual
    • None

    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}}}'

      Attachments

        Activity

          People

            andrew.aldridge@mongodb.com Andrew Aldridge
            david.hows David Hows
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8 years, 45 weeks, 5 days ago