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 <graman...@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.
>

Reply via email to