# CSV EPOCH to Timestamp

**URL:** https://discuss.elastic.co/t/csv-epoch-to-timestamp/181273
**Category:** Logstash
**Created:** [May 15, 2019, 8:35pm UTC](https://discuss.elastic.co/t/csv-epoch-to-timestamp/181273 "2019-05-15T20:35:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![teamg](https://avatars.discourse-cdn.com/v4/letter/t/e19b73/32.png) [@teamg](https://discuss.elastic.co/u/teamg)
#### Post date: [May 15, 2019, 8:35pm UTC](https://discuss.elastic.co/t/csv-epoch-to-timestamp/181273/1 "2019-05-15T20:35:26Z")

</div>

I have a csv file with contents similar to this:

> UNIT\_ID,Serial\_Number,TIME  
> UNIT4690,MMC3430089,1557866550  
> UNIT4691,MMC3500092,1557866545  
> UNIT4692,MMC5100135,1557866546

This first line are the column names. The TIME column is the EPOCH time of the record retrieval. I'm able to ingest it into Elastic via Logstash but I want the @timestamp to be the time in the TIME column.

My filter is as follows:

> filter {  
> csv {  
> separator =\> ","  
> columns =\> ["UNIT\_ID" , "Serial\_Number" , "Query Date"]  
> }
> 
> ```
> date {
> match => ["TIME" , "UNIX"]
> }
> 
> ```
> 
> }

When I ingest it now they all have the same @timestamp. What am I missing?

---

<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: [May 15, 2019, 8:50pm UTC](https://discuss.elastic.co/t/csv-epoch-to-timestamp/181273/2 "2019-05-15T20:50:27Z")

</div>

> [@teamg](#):
>
> What am I missing?

You renamed the TIME column to field [Query Date] using the columns option of your csv filter.

---

<div class="post-metadata">

### Author: ![teamg](https://avatars.discourse-cdn.com/v4/letter/t/e19b73/32.png) [@teamg](https://discuss.elastic.co/u/teamg)
#### Post date: [May 16, 2019, 3:04pm UTC](https://discuss.elastic.co/t/csv-epoch-to-timestamp/181273/3 "2019-05-16T15:04:18Z")

</div>

Sure did. Replacing it with TIME fixed the problem. Thanks again Badger.

---

<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: [June 13, 2019, 3:04pm UTC](https://discuss.elastic.co/t/csv-epoch-to-timestamp/181273/4 "2019-06-13T15:04:28Z")

</div>

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