ozlerhakan / mongolastic

:traffic_light: A dataset migration tool from MongoDB to Elasticsearch and vice versa.
MIT License
136 stars 34 forks source link

Date is stored as string in mongodb #29

Closed mindcrusher11 closed 4 years ago

mindcrusher11 commented 6 years ago

I am transferring data from elasticsearch to mongodb but date column is stored as string.

winder commented 6 years ago

You can configure the format with the dateFormat option, or look at CustomDateFormat.java for how that serialization is done.

It looks like the code should use the default DateFormat implementation if you set that value to null.

mindcrusher11 commented 6 years ago

I have configured deatformat as well.

"dateFormat": "MM-dd-yy", "longToString": true

Thanks Gaurhari

On Tue, Oct 23, 2018 at 8:41 PM Will Winder notifications@github.com wrote:

You can configure the format with the dateFormat option, or look at CustomDateFormat.java for how that serialization is done.

It looks like the code should use the default DateFormat implementation if you set that value to null.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ozlerhakan/mongolastic/issues/29#issuecomment-432390669, or mute the thread https://github.com/notifications/unsubscribe-auth/ACVt9vRNg0Y8bIoA91qWDZZcux2axjIZks5un3DWgaJpZM4X1mGm .