How can I save new Date() in MongoDB?

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 -

  1. https://github.com/Studio3T/robomongo/issues/614
  2. https://github.com/Studio3T/robomongo/issues/477

Just save this JSON

{"name": "whatever", "your_cool_date": "2017-03-17 11:59"}

it will be saved as a ISO date in the database:

"your_cool_date" : ISODate("2017-03-17T10:59:00Z"),

Tags:

Mongodb

Robo3T