# How to show date in UTC format in the downloaded CSV file from kibana

**URL:** <https://discuss.elastic.co/t/how-to-show-date-in-utc-format-in-the-downloaded-csv-file-from-kibana/85618>\
**Category:** Kibana\
**Created:** [May 12, 2017, 8:05pm UTC](https://discuss.elastic.co/t/how-to-show-date-in-utc-format-in-the-downloaded-csv-file-from-kibana/85618 "2017-05-12T20:05:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bhavana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavana/32/12221_2.png) [@Bhavana](https://discuss.elastic.co/u/Bhavana)\
**Post date:** [May 12, 2017, 8:05pm UTC](https://discuss.elastic.co/t/how-to-show-date-in-utc-format-in-the-downloaded-csv-file-from-kibana/85618/1 "2017-05-12T20:05:08Z")

</div>

Hello Everyone,

when i download the CSV file from the kibana visualization , i am getting date in UNIX format rather than UTC. Is there any possibility to get that date field in UTC format itself ?

Thanks ,  
Bhavana.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [May 15, 2017, 7:17pm UTC](https://discuss.elastic.co/t/how-to-show-date-in-utc-format-in-the-downloaded-csv-file-from-kibana/85618/2 "2017-05-15T19:17:09Z")

</div>

If you're exporting DataTable data you could use this scripted field as one of the columns so that you can get the date in a formated string:  
`def sdf = new SimpleDateFormat('YYYY/MM/dd HH:mm:ss z');sdf.setTimeZone(TimeZone.getTimeZone("UTC"));sdf.format(new Date(doc['@timestamp'].value))`  
This script will convert the value of the `@timestamp` field to a string formatted to UTC timezone like this `2017/05/15 11:16:20 AM UTC`  
Keep in mind that this will be a resource intensive script if you have lots of docs in your vis.

---

<div class="post-metadata">

**Author:** ![Bhavana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavana/32/12221_2.png) [@Bhavana](https://discuss.elastic.co/u/Bhavana)\
**Post date:** [May 18, 2017, 12:57pm UTC](https://discuss.elastic.co/t/how-to-show-date-in-utc-format-in-the-downloaded-csv-file-from-kibana/85618/3 "2017-05-18T12:57:34Z")

</div>

Thanks for the reply ,

I didn't look at the formatted data download in kibana , it is showing me date in the UTC format rather than the UNIX format which is shown in Raw download in kibana.

I tried the scripted field too, as it is mentioned resource intensive which is so slow for retrieving results.

---

<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 15, 2017, 12:57pm UTC](https://discuss.elastic.co/t/how-to-show-date-in-utc-format-in-the-downloaded-csv-file-from-kibana/85618/4 "2017-06-15T12:57:34Z")

</div>

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