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 validation try ends with:
Unable to parse JSON
Any Ideas?
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 validation try ends with:
Unable to parse JSON
Any Ideas?
Copyright © 2021 Jogjafile Inc.
In
robomongo
when you right clicked on collection name and clickInsert documents...
new pop up window open and if you insertdates
as below and click on save button, then it shows errorUnable to parse JSON
because ofrobomongo
not understandnew Date()
function in insert document view. This consider asJSON
and{manufactureDate : new Date(2009,8,2)}
not a validJSON
format. So Instead of insertingdates
usingInsert documents...
use direct mongo commandInsert date using query for run this query press (
ctrl + enter
) :This will insert date in
ISODate
format.