# Splitting Records With Start and End Times Into Separate Documents With A Timestamp Every X Minutes

**URL:** https://discuss.elastic.co/t/splitting-records-with-start-and-end-times-into-separate-documents-with-a-timestamp-every-x-minutes/360997
**Category:** Logstash
**Created:** [June 6, 2024, 8:29pm UTC](https://discuss.elastic.co/t/splitting-records-with-start-and-end-times-into-separate-documents-with-a-timestamp-every-x-minutes/360997 "2024-06-06T20:29:46Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [July 16, 2024, 6:21pm UTC](https://discuss.elastic.co/t/splitting-records-with-start-and-end-times-into-separate-documents-with-a-timestamp-every-x-minutes/360997/5 "2024-07-16T18:21:52Z")

</div>

> [@nickbarry](#):
>
> I can't find how to convert LogStash::Timestamp to a Ruby Time object IN THE RUBY SCRIPT.

Use Time.at. Example [here](https://discuss.elastic.co/t/changing-time-format/278115/2).

---

_[View the full topic](https://discuss.elastic.co/t/splitting-records-with-start-and-end-times-into-separate-documents-with-a-timestamp-every-x-minutes/360997)._
