简体   繁体   中英

How can i insert current date in robomongo?

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()})

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM