Re: Re: How to add current date in RobomongoDB

From: Mane Nilesh <nileshmane1988@xxxxxxxxx>
To: mongodb-user@xxxxxxxxxxxxxxxx, chris.cunningham@xxxxxxxxxxx
Date: Mon, 2 May 2016 15:34:21 +0530
Why ads?
issue not solved

PFA

On Mon, May 2, 2016 at 12:11 PM, Chris Cunningham <
chris.cunningham@xxxxxxxxxxx> wrote:

Nilesh,

Because Robomongo embeds the mongo shell, you should be able to add the
current date like the following example:

{
    "date" : ISODate("2016-05-26T00:00:00.000Z"),
    "userId" : NumberLong(10),
    "name" : "Green Tea with honey",
    "calss" : "BSC-SE",
    "createdAt" : new ISODate()
}



This works because the MongoDB shell is a JavaScript REPL, so you are able
to utilize JavaScript constructors to simplify tasks.

Additional information on new ISODate()can be found in the MongoDB
documentation at:

[Data Types in the mongo Shell
<https://docs.mongodb.org/manual/core/shell-types/#date>]

Please let us know if you have any further questions.

Regards,

Chris




On Wednesday, April 27, 2016 at 12:31:14 AM UTC+10, NileshM wrote:

i want to insert exact current date in mongoDB throw robo mongo.
PFA

--
You received this message because you are subscribed to the Google Groups
"mongodb-user"
group.

For other MongoDB technical support options, see:
https://docs.mongodb.org/manual/support/
---
You received this message because you are subscribed to a topic in the
Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/mongodb-user/qDECOYroWRc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/aaa5807d-f8fa-4ee8-9ae1-871d9abaf436%40googlegroups.com
<https://groups.google.com/d/msgid/mongodb-user/aaa5807d-f8fa-4ee8-9ae1-871d9abaf436%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.




-- 
Cheers,
Nilesh

-- 
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
--- 
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAB0WCd86sfyLv9xrH2zrUW6TVpj4X2MS1nofjM7-eeQP7VEjAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?