I want to add a date field in mongo db. I am using robo mongo. How can i do that?
If it is a string we can do it by "", if it is a number we can do it by NumberInt. What is the datatype for date field? Also, how can I insert current date?
db.yourcollection.insert({date_field_name:new Date()})
db.yourcollection.insert({date_field_name:new Date()})