When I save a date time in MongoDB using the following format, it shows:
Error "Unable to parse JSON"
{
"_id" : ObjectId("58cb759805aeeae37a56dd3d"),
"name" : "Plutus",
"admin" : "type 1",
"created" : new Date()
}
Please help me to save a date time in Robomongo using MongoDB in the above format.
Error description in picture:
Thanks
You could try using new ISODate("2017-03-17 11:59")
. I know it is a little cumbersome, but this is the only date value that is guaranteed to work across all versions of Robomongo and MongoDB.
Further reading -