# Create a TimeStamp without having a real Date from a csv with a time-index

**URL:** <https://discuss.elastic.co/t/create-a-timestamp-without-having-a-real-date-from-a-csv-with-a-time-index/87584>\
**Category:** Logstash\
**Created:** [May 30, 2017, 2:40pm UTC](https://discuss.elastic.co/t/create-a-timestamp-without-having-a-real-date-from-a-csv-with-a-time-index/87584 "2017-05-30T14:40:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![S3nda8a](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@S3nda8a](https://discuss.elastic.co/u/S3nda8a)\
**Post date:** [May 30, 2017, 2:40pm UTC](https://discuss.elastic.co/t/create-a-timestamp-without-having-a-real-date-from-a-csv-with-a-time-index/87584/1 "2017-05-30T14:40:04Z")

</div>

Hello there,  
i want to visualize a lot of old csv files.  
The files contains a lot of data each.

Structure:  
Time;DataSet1;[...];DataSet48  
0.009618018;[...];0  
0.019466060;[...];1  
[...]  
720.946525393;[...];0.012807

The Time-base are seconds. Beginning at the moment the file was created.

My logstash.conf looks like this:

filter {  
csv {  
separator =\> ";"  
columns =\> ["Time","DataSet1",[...],[DataSet48]]  
convert =\> {"Time" =\> "float"}  
convert =\> {"DataSet1" =\> "float"}  
[...]  
convert =\> {"DataSet48" =\> "float"}  
}  
date{  
match =\> ["Time", "s.SSSSSSSSS"]  
target =\> "timestamp"  
}  
}

output{  
elasticsearch {  
action =\> "index"  
hosts =\> "localhost"  
index =\> "cv"  
workers =\> 1  
}  
stdout { codec =\> rubydebug }  
}

Everything is loaded without error. So far so good.

My Problem:  
There is a huge mismatch in the timestamp. I got 6.000 entries on Jan. 1st 2017 from 00:00 o'clock to 00:01 o'clock. I can't find any data entry with a "Time" older than 59.999999999.

Is it possible to convert my "Time" in something that Kibana can visualize with all of my data?

Greetings S3

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 30, 2017, 2:46pm UTC](https://discuss.elastic.co/t/create-a-timestamp-without-having-a-real-date-from-a-csv-with-a-time-index/87584/2 "2017-05-30T14:46:15Z")

</div>

What do your time values mean? What is the time relative to?

---

<div class="post-metadata">

**Author:** ![S3nda8a](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@S3nda8a](https://discuss.elastic.co/u/S3nda8a)\
**Post date:** [May 30, 2017, 2:51pm UTC](https://discuss.elastic.co/t/create-a-timestamp-without-having-a-real-date-from-a-csv-with-a-time-index/87584/3 "2017-05-30T14:51:46Z")

</div>

The values are seconds with a lot of decimal and start at zero when the file was created / the machine stared to do its stuff.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 30, 2017, 2:54pm UTC](https://discuss.elastic.co/t/create-a-timestamp-without-having-a-real-date-from-a-csv-with-a-time-index/87584/4 "2017-05-30T14:54:43Z")

</div>

There's nothing built-in for this but I suppose you could use a ruby filter to check the creation time of the input file (the path to which can be found in the `path` field) and add that time to the first column.

---

<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 27, 2017, 2:55pm UTC](https://discuss.elastic.co/t/create-a-timestamp-without-having-a-real-date-from-a-csv-with-a-time-index/87584/5 "2017-06-27T14:55:54Z")

</div>

Closed on June 27, 2017, 2:55pm UTC

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