# Auto Detect Date/Time

**URL:** <https://discuss.elastic.co/t/auto-detect-date-time/207418>\
**Category:** Kibana\
**Created:** [November 11, 2019, 10:21pm UTC](https://discuss.elastic.co/t/auto-detect-date-time/207418 "2019-11-11T22:21:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim\_Thunder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jim_thunder/32/45439_2.png) [@Jim\_Thunder](https://discuss.elastic.co/u/Jim_Thunder)\
**Post date:** [November 11, 2019, 10:21pm UTC](https://discuss.elastic.co/t/auto-detect-date-time/207418/1 "2019-11-11T22:21:53Z")

</div>

Hello!

So I have records coming in CSV format and they are parsed out properly.

One issue is that a few of the fields have a time or date in them. That time/date is accurate when I look at the raw data but after the record is parsed they change to a default number: 1 day behind and 18:00 for the time. My parsing doesn't change any formatting, it only splits the CSV into fields.

I think the reason is that Kibana auto detects time/date and changes the field type. I do not want Kibana to do this. How can I turn that setting off?

Thanks!

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [November 18, 2019, 8:13pm UTC](https://discuss.elastic.co/t/auto-detect-date-time/207418/2 "2019-11-18T20:13:26Z")

</div>

What are you using to import those CSV documents? And can you give us an example?

---

<div class="post-metadata">

**Author:** ![Jim\_Thunder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jim_thunder/32/45439_2.png) [@Jim\_Thunder](https://discuss.elastic.co/u/Jim_Thunder)\
**Post date:** [November 21, 2019, 5:30pm UTC](https://discuss.elastic.co/t/auto-detect-date-time/207418/3 "2019-11-21T17:30:10Z")

</div>

I recently discovered the answer to this question incase anyone else has this problem with mainframe SMF records:

Within the SMF record there are fields that contain dates. These dates do _not_ have a time.  
Elastic doesn't like that. Why? Because the field type is set to date, which is required by elastic to have a time.  
So, elastic automatically assigns a default time to that date.  
The default time used by elastic is midnight, UTC timezone.  
When Kibana gets the timezone from the browser, which is `-0600` , it modifies all times within the record based on that timezone.  
So now, instead of midnight "today" it sets it to `-0600` , which comes out to `18:00` (6pm) on the _previous_ day.The only two ways to help fix my problem are this:

1. Re-index making ALL `date` fields a `string` field instead.

2. Create a new string field, in the logstash config, that takes the value from the date field. This needs to be done for every date field (there's like 6) which is why re-indexing is better. (edited)

---

<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:** [December 19, 2019, 5:30pm UTC](https://discuss.elastic.co/t/auto-detect-date-time/207418/4 "2019-12-19T17:30:16Z")

</div>

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