camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Kripalani <ra...@apache.org>
Subject Re: How to insert Date String as date in MongoDB
Date Thu, 03 Mar 2016 18:06:18 GMT
MongoDB uses a special representation of JSON they call BSON.

According to their docs, timestamps should be represented with the
$timestamp token, along with 't' and 'i' portions for them to be
interpreted correctly by the drivers:
https://docs.mongodb.org/manual/reference/mongodb-extended-json/#timestamp.
It requires turning the date into an epoch.

For dates:
https://docs.mongodb.org/manual/reference/mongodb-extended-json/#data_date.

Could you guys try that?

*Raúl Kripalani*
PMC & Committer @ Apache Ignite, Apache Camel | Integration, Big Data and
Messaging Engineer
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
Blog: raul.io | twitter: @raulvk <https://twitter.com/raulvk>

On Thu, Mar 3, 2016 at 3:47 PM, gramanero <gramanero@gmail.com> wrote:

> I would be interested in knowing the answer on how to do this as well. I
> posted in a different thread and the datatype I am trying to do this with
> is
> the ISODate built-in mongo type. I am using Spring DSL as well. Thanks!
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-insert-Date-String-as-date-in-MongoDB-tp5778310p5778555.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message