# Data Visualizer - Import/Convert multiple date fields

**URL:** https://discuss.elastic.co/t/data-visualizer-import-convert-multiple-date-fields/209396
**Category:** Kibana
**Created:** [November 25, 2019, 11:40pm UTC](https://discuss.elastic.co/t/data-visualizer-import-convert-multiple-date-fields/209396 "2019-11-25T23:40:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bytemedwb](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@bytemedwb](https://discuss.elastic.co/u/bytemedwb)
#### Post date: [November 25, 2019, 11:40pm UTC](https://discuss.elastic.co/t/data-visualizer-import-convert-multiple-date-fields/209396/1 "2019-11-25T23:40:30Z")

</div>

All: Fought this all day and asking for help. I am running 7.4.2  
I have a CSV file with two date fields. I want to keep both a keyword and date version of each field.  
I have reviewed several posts but don't see one that addresses my problem.  
I am attempting to use the Kibana Data Visualizer file import tools.

This is my mapping

> ```
> {
> "ACType": {
> "type": "keyword"
> },
> "ASN": {
> "type": "keyword"
> },
> "BaseID": {
> "type": "keyword"
> },
> "Download_DT": {
> "type": "keyword"
> },
> "ESN": {
> "type": "keyword"
> },
> "FC3Caused": {
> "type": "long"
> },
> "FCTYPE": {
> "type": "keyword"
> },
> "FTIME": {
> "type": "double"
> },
> "FaultCode": {
> "type": "long"
> },
> "FaultText": {
> "type": "keyword"
> },
> "Fault_DT": {
> "type": "keyword"
> },
> "FltsAgo": {
> "type": "long"
> },
> "FreqFlt": {
> "type": "keyword"
> },
> "Location": {
> "type": "long"
> },
> "Remark": {
> "type": "text"
> },
> "Remark_DT": {
> "type": "keyword"
> },
> "DownloadDate": {
> "type": "date"
> },
> "FaultDate": {
> "type": "date"
> }
> }
> 
> ```

This is my input pipeline:

> ```
> {
> "description": "Ingest pipeline created by file structure finder",
> "processors": [
> {
> "date": {
> "field": "Download_DT",
> "target_field": "DownloadDate",
> "timezone": "{{ beat.timezone }}",
> "formats": [
> "MM/dd/yy HH:mm"
> ]
> }
> },
> {
> "date": {
> "field": "Fault_DT",
> "target_field":"FaultDate",
> "timezone": "{{ beat.timezone }}",
> "formats": [
> "MM/dd/yy HH:mm"
> ]
> }
> }
> ]
> }
> 
> ```

I have tried several variations of this. In this case the import fails as follows:

> 0: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: unable to parse date [12/21/17 17:53]
> 
> {"ACType":"F-15","ASN":"890500","BaseID":"SEYMOUR-JOHNSON","Download\_DT":"12/21/17 16:50","ESN":"719321","Fault\_DT":"12/21/17 17:53","FaultCode":72,"FaultText":"FTIT B SIGNL","FCTYPE":"FC","FltsAgo":0,"FreqFlt":"T","FTIME":3837.66,"Location":2}
> 
> 1: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: unable to parse date [12/21/17 17:53]
> 
> {"ACType":"F-15","ASN":"890500","BaseID":"SEYMOUR-JOHNSON","Download\_DT":"12/21/17 16:50","ESN":"719321","Fault\_DT":"12/21/17 17:53","FaultCode":4070,"FaultText":"FTIT SYSTEM","FC3Caused":72,"FTIME":3837.66,"Location":2}

If I take out the extra {} around each date processor as suggested in another post, only the last one in the list is processed.

---

<div class="post-metadata">

### Author: ![matw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matw/32/13913_2.png) [@matw](https://discuss.elastic.co/u/matw)
#### Post date: [November 28, 2019, 9:28am UTC](https://discuss.elastic.co/t/data-visualizer-import-convert-multiple-date-fields/209396/2 "2019-11-28T09:28:21Z")

</div>

Hi

Do you need a ingest processing, would it be sufficient for you to solve it just by mapping? e.g. using the following:

```
{
  "date1": {
    "type": "date",
    "format": "MM/dd/yy HH:mm",
    "fields":{
      "raw": {
        "type": "keyword"
      }
    }
  },
  "date2": {
    "type": "date",
    "format": "MM/dd/yy HH:mm",
     "fields":{
      "raw": {
        "type": "keyword"
      }
    }
  }
}

```

Thx & Best,  
Matthias

---

<div class="post-metadata">

### Author: ![bytemedwb](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@bytemedwb](https://discuss.elastic.co/u/bytemedwb)
#### Post date: [December 2, 2019, 8:19pm UTC](https://discuss.elastic.co/t/data-visualizer-import-convert-multiple-date-fields/209396/3 "2019-12-02T20:19:47Z")

</div>

Thanks that did the trick.

---

<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 30, 2019, 8:30pm UTC](https://discuss.elastic.co/t/data-visualizer-import-convert-multiple-date-fields/209396/4 "2019-12-30T20:30:28Z")

</div>

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