# Split date with other interval

**URL:** <https://discuss.elastic.co/t/split-date-with-other-interval/81798>\
**Category:** Elasticsearch\
**Created:** [April 10, 2017, 10:16am UTC](https://discuss.elastic.co/t/split-date-with-other-interval/81798 "2017-04-10T10:16:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![siam](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@siam](https://discuss.elastic.co/u/siam)\
**Post date:** [April 10, 2017, 10:16am UTC](https://discuss.elastic.co/t/split-date-with-other-interval/81798/1 "2017-04-10T10:16:44Z")

</div>

Hello everyone 😉,

This my use case 🙂

Is it possible with elasticsearch to change interval on a time series with a query and to recalculate the value ?  
For example, I have a series of data per day,  
I would like the time series split by hour, divide each hour by 24 or to split with a linear function

2017-04-11 584  
2017-04-12 410  
2017-04-13 988  
2017-04-14 488  
2017-04-15 19  
2017-04-16 189  
2017-04-17 85  
2017-04-18 564

thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 10, 2017, 10:32am UTC](https://discuss.elastic.co/t/split-date-with-other-interval/81798/2 "2017-04-10T10:32:43Z")

</div>

You can do this with a scripted field easily enough.

---

<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 8, 2017, 10:38am UTC](https://discuss.elastic.co/t/split-date-with-other-interval/81798/3 "2017-05-08T10:38:01Z")

</div>

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