# Oracle to Elastic search date conversion #logstash

**URL:** <https://discuss.elastic.co/t/oracle-to-elastic-search-date-conversion-logstash/262368>\
**Category:** Logstash\
**Created:** [January 27, 2021, 12:59pm UTC](https://discuss.elastic.co/t/oracle-to-elastic-search-date-conversion-logstash/262368 "2021-01-27T12:59:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![onkarborade](https://avatars.discourse-cdn.com/v4/letter/o/8e7dd6/32.png) [@onkarborade](https://discuss.elastic.co/u/onkarborade)\
**Post date:** [January 27, 2021, 12:59pm UTC](https://discuss.elastic.co/t/oracle-to-elastic-search-date-conversion-logstash/262368/1 "2021-01-27T12:59:27Z")

</div>

Hi,

Trying to insert records from Oracle db to Elastic search using logstash

I am getting default date format of field from oracle database is 2021-01-27T12:39:01.867Z

and I want to save a field in elastic search in format of yyyy-MM-dd-HH:mm

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [January 27, 2021, 4:29pm UTC](https://discuss.elastic.co/t/oracle-to-elastic-search-date-conversion-logstash/262368/2 "2021-01-27T16:29:28Z")

</div>

If a column in the database is a timestamp then the jdbc input will convert it to a Logstash::Timestamp type. You can reformat that as a string using [ruby](https://discuss.elastic.co/t/date-field-being-converted-to-timestamps/180044/4).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 24, 2021, 4:29pm UTC](https://discuss.elastic.co/t/oracle-to-elastic-search-date-conversion-logstash/262368/3 "2021-02-24T16:29:33Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
