# Time stamps, mappings, and range filters

**URL:** https://discuss.elastic.co/t/time-stamps-mappings-and-range-filters/24975
**Category:** Elasticsearch
**Created:** [July 6, 2015, 6:49pm UTC](https://discuss.elastic.co/t/time-stamps-mappings-and-range-filters/24975 "2015-07-06T18:49:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![aarongu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aarongu/32/3626_2.png) [@aarongu](https://discuss.elastic.co/u/aarongu)
#### Post date: [July 6, 2015, 6:49pm UTC](https://discuss.elastic.co/t/time-stamps-mappings-and-range-filters/24975/1 "2015-07-06T18:49:41Z")

</div>

Hello all,

First time posting!  
I was having some difficulty with time stamps. In the files i am parsing the time is formatted as HH:MM:ss:.SSS, I try and run this query :

```
GET /logs-index/_search
{
  "query": {
    "range": {
      "time": {
        "gte": "14:00:00.123",
        "lte": "15:00:00.123"
      }
    }
  }
}

```

When I go to the mappings for my time field it says

```
  "time": {
         "type": "string"
  }

```

I figure I need to update the mapping of this, but I am unsure how.

Thanks for any suggestions!  
-Aaron

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [July 6, 2015, 7:03pm UTC](https://discuss.elastic.co/t/time-stamps-mappings-and-range-filters/24975/2 "2015-07-06T19:03:46Z")

</div>

You can not update a mapping. Create a new index, define the mapping, then index your data.

---

<div class="post-metadata">

### Author: ![aarongu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aarongu/32/3626_2.png) [@aarongu](https://discuss.elastic.co/u/aarongu)
#### Post date: [July 8, 2015, 5:46pm UTC](https://discuss.elastic.co/t/time-stamps-mappings-and-range-filters/24975/3 "2015-07-08T17:46:26Z")

</div>

Thanks! worked like a charm

---

<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: [July 6, 2017, 12:02am UTC](https://discuss.elastic.co/t/time-stamps-mappings-and-range-filters/24975/4 "2017-07-06T00:02:49Z")

</div>


