RoboMongo 0.8.5 Date entry error

Tried many formats like:

manufactureDate : new Date("2009-8-2"),

      

or

manufactureDate : new Date(2009,8,2),

      

or even

manufactureDate : new Date("Feb 8, 2009"),

      

Each check ends with:

Unable to parse JSON

      

Any ideas?

+3


source to share


1 answer


In robomongo

, when you right clicked on the collection name and click Insert documents...

, a new popup window will open, and if you enter dates

as below and click save, then an error will appear Unable to parse JSON

due to robomongo

not understanding the new Date()

function in insert document mode. This is JSON

also considered an {manufactureDate : new Date(2009,8,2)}

invalid format JSON

. So instead of pasting dates

with, Insert documents...

use the direct mongo command

enter image description here

Enter date using query to run this query press ( ctrl + enter

):



enter image description here

This will add the date in the format ISODate

.

+7


source







All Articles