# Changing a Json term to become the timestamp

**URL:** <https://discuss.elastic.co/t/changing-a-json-term-to-become-the-timestamp/75908>\
**Category:** Kibana\
**Created:** [February 21, 2017, 3:53pm UTC](https://discuss.elastic.co/t/changing-a-json-term-to-become-the-timestamp/75908 "2017-02-21T15:53:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)\
**Post date:** [February 21, 2017, 3:53pm UTC](https://discuss.elastic.co/t/changing-a-json-term-to-become-the-timestamp/75908/1 "2017-02-21T15:53:28Z")

</div>

Hi,

My Filebeat is reading the time that the a log file is created as the timestamp. This is a problem since it does not read every message in the log with a unique time.  
What I am trying to do is to parse a json that one of its terms will become the timestamp, that I will be able to get correct graphs. (through Kibana or filebeat)

Here is an example of such a json

{  
"msg": "Hello",  
"msgSubmissionTime": "1484752676968"  
}

Many Thanks for any one who can help

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [February 21, 2017, 4:52pm UTC](https://discuss.elastic.co/t/changing-a-json-term-to-become-the-timestamp/75908/2 "2017-02-21T16:52:14Z")

</div>

hi @tomer,

I think you'll find better luck in the Beats forum indeed: cf. [Changing a term in a json to become the timestamp from filebeat](https://discuss.elastic.co/t/changing-a-term-in-a-json-to-become-the-timestamp-from-filebeat/75907)

One thing you can consider in Kibana (but I wouldn't recommend it), is using a scripted field to convert that time-stamp to a date. To get started, see [https://www.elastic.co/guide/en/kibana/current/scripted-fields.html](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html). That way, you'll convert the time-stamp on-the-fly at query-time instead of index-time.

---

<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:** [March 21, 2017, 4:52pm UTC](https://discuss.elastic.co/t/changing-a-json-term-to-become-the-timestamp/75908/3 "2017-03-21T16:52:21Z")

</div>

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