# How to load data 12/04/2018 11:00:55 -0000 timestamp via logstash into elastic search

**URL:** https://discuss.elastic.co/t/how-to-load-data-12-04-2018-1155-0000-timestamp-via-logstash-into-elastic-search/178205
**Category:** Elasticsearch
**Created:** [April 24, 2019, 9:25am UTC](https://discuss.elastic.co/t/how-to-load-data-12-04-2018-1155-0000-timestamp-via-logstash-into-elastic-search/178205 "2019-04-24T09:25:34Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Swati123](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@Swati123](https://discuss.elastic.co/u/Swati123)
#### Post date: [April 24, 2019, 9:25am UTC](https://discuss.elastic.co/t/how-to-load-data-12-04-2018-1155-0000-timestamp-via-logstash-into-elastic-search/178205/1 "2019-04-24T09:25:34Z")

</div>

I have server logs data of one of the field date as **12/04/2018 11:00:55 -0000** but I am not able to load this data directly even after defining the field mapping as

PUT new-swati-2019.04.24  
{  
"mappings": {  
"doc": {  
"properties": {  
"request\_date": {  
"type": "date",  
"format": "dd/MMM/yyyy:HH:mm:ss ZZZZ"  
}  
}  
}  
}  
}

Via filebeat, I guess it's not possible but can we check via logstash configuration ?? or how can we do this?  
Please suggest

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [April 25, 2019, 6:28am UTC](https://discuss.elastic.co/t/how-to-load-data-12-04-2018-1155-0000-timestamp-via-logstash-into-elastic-search/178205/2 "2019-04-25T06:28:44Z")

</div>

Hey,

try this

```auto
DELETE foo

PUT foo
{
  "mappings": {
    "properties": {
      "date": {
        "type": "date",
        "format": "dd/MM/yyyy HH:mm:ss Z"
      }
    }
  }
}

PUT foo/_doc/1
{
  "date" : "12/04/2018 11:00:55 -0000"
}

GET foo/_search
{
  "query": {
    "range": {
      "date": {
        "gte": "2018-04-12",
        "format": "strict_date_optional_time"
      }
    }
  }
}

```

Note, this assumes you are using Elasticsearch 7.0.

--Alex

---

<div class="post-metadata">

### Author: ![Swati123](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@Swati123](https://discuss.elastic.co/u/Swati123)
#### Post date: [April 26, 2019, 6:38am UTC](https://discuss.elastic.co/t/how-to-load-data-12-04-2018-1155-0000-timestamp-via-logstash-into-elastic-search/178205/3 "2019-04-26T06:38:09Z")

</div>

@spinscale Thanks Alex for your reply..  
But I am using 6.7.0 kibana version.  
Could you please help me on this accordingly.

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [April 26, 2019, 6:40am UTC](https://discuss.elastic.co/t/how-to-load-data-12-04-2018-1155-0000-timestamp-via-logstash-into-elastic-search/178205/4 "2019-04-26T06:40:24Z")

</div>

try

```auto
DELETE foo

PUT foo
{
  "mappings": {
    "_doc": {
      "properties": {
        "date": {
          "type": "date",
          "format": "dd/MM/yyyy HH:mm:ss Z"
        }
      }
    }
  }
}

PUT foo/_doc/1?refresh
{
  "date" : "12/04/2018 11:00:55 -0000"
}

GET foo/_search
{
  "query": {
    "range": {
      "date": {
        "gte": "2018-04-12",
        "format": "strict_date_optional_time"
      }
    }
  }
}

```

---

<div class="post-metadata">

### Author: ![Swati123](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@Swati123](https://discuss.elastic.co/u/Swati123)
#### Post date: [April 26, 2019, 6:46am UTC](https://discuss.elastic.co/t/how-to-load-data-12-04-2018-1155-0000-timestamp-via-logstash-into-elastic-search/178205/5 "2019-04-26T06:46:35Z")

</div>

@spinscale Thanks it worked

---

<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: [May 24, 2019, 6:46am UTC](https://discuss.elastic.co/t/how-to-load-data-12-04-2018-1155-0000-timestamp-via-logstash-into-elastic-search/178205/6 "2019-05-24T06:46:40Z")

</div>

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