# Convert epoch time columns to date in lostash config file

**URL:** https://discuss.elastic.co/t/convert-epoch-time-columns-to-date-in-lostash-config-file/244122
**Category:** Logstash
**Created:** [August 7, 2020, 6:34am UTC](https://discuss.elastic.co/t/convert-epoch-time-columns-to-date-in-lostash-config-file/244122 "2020-08-07T06:34:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Bucky101](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bucky101/32/46894_2.png) [@Bucky101](https://discuss.elastic.co/u/Bucky101)
#### Post date: [August 7, 2020, 6:34am UTC](https://discuss.elastic.co/t/convert-epoch-time-columns-to-date-in-lostash-config-file/244122/1 "2020-08-07T06:34:58Z")

</div>

Hey as per below, i have am polling a http and passing through the csv filter pulling date which works fine. However I need to convert the epoch timestamp to readable date and time. I have tried a few different ways with no luck including convert in the csv plugin and the date plugin.  
I have even tried deleting the indexes and letting it pull again but the data still comes through as 'text'

```auto
filter {

                         ## Parse values from "cdr" array and create a field for each value ##
   csv {
     source => "message"
     separator => ","
     skip_header => "true"
     columns => ["callref","created","time_start","direction","platform","source","destination","clid","to","duration","billable_time","billed_cost","definition"]
		#convert => {
		#	"created" => "date_time"
		#	"time_start" => "date_time"
		#}
     target => "cdr"
   }
   date {
		match => ["created","UNIX_MS"]
		target => "created"
		timezone => "UTC"
}

```

---

<div class="post-metadata">

### Author: ![Jenni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jenni/32/29684_2.png) [@Jenni](https://discuss.elastic.co/u/Jenni)
#### Post date: [August 7, 2020, 8:02am UTC](https://discuss.elastic.co/t/convert-epoch-time-columns-to-date-in-lostash-config-file/244122/2 "2020-08-07T08:02:51Z")

</div>

What does the output look like right now?

---

<div class="post-metadata">

### Author: ![Bucky101](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bucky101/32/46894_2.png) [@Bucky101](https://discuss.elastic.co/u/Bucky101)
#### Post date: [August 10, 2020, 4:35am UTC](https://discuss.elastic.co/t/convert-epoch-time-columns-to-date-in-lostash-config-file/244122/3 "2020-08-10T04:35:26Z")

</div>

```auto
    {
      "_index": "test-2020.08.07",
      "_type": "_doc",
      "_id": "lEmTx3MBIcx4DRpOZCjF",
      "_version": 1,
      "_score": 0,
      "_source": {
        "cdr": {
          "duration": "2412",
          "billed_cost": "0.5423",
          "callref": "Q8W2VT3MBEG5",
          "destination": "61185991111",
          "clid": "61108251111",
          "definition": "outbound_fixed",
          "billable_time": "2410",
          "direction": "outbound",
          "time_start": "1596758421",
          "source": "J8UHA67",
          "to": "61285992111",
          "created": "1596760833",
          "platform": "AIRtest"
        },
        "@timestamp": "2020-08-07T06

```

whereas i would like to show time\_start and created to human readable as per below

**GMT** : Friday, August 7, 2020 12:00:21 AM  
**Your time zone** : Friday, August 7, 2020 10:00:21 AM [GMT+10:00](https://www.epochconverter.com/timezones?q=1596758421)

---

<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: [September 7, 2020, 4:35am UTC](https://discuss.elastic.co/t/convert-epoch-time-columns-to-date-in-lostash-config-file/244122/4 "2020-09-07T04:35:33Z")

</div>

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