# Datatable visualization - Trim the time from timestamp

**URL:** <https://discuss.elastic.co/t/datatable-visualization-trim-the-time-from-timestamp/58773>\
**Category:** Kibana\
**Created:** [August 24, 2016, 6:53am UTC](https://discuss.elastic.co/t/datatable-visualization-trim-the-time-from-timestamp/58773 "2016-08-24T06:53:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sruthi](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@sruthi](https://discuss.elastic.co/u/sruthi)\
**Post date:** [August 24, 2016, 6:53am UTC](https://discuss.elastic.co/t/datatable-visualization-trim-the-time-from-timestamp/58773/1 "2016-08-24T06:53:13Z")

</div>

I have created a datatable visualization to show per day logcount using DateHistogram. The timestamp is showing as - August 24th 2016, 00:00:00.000. Is there any way to trim the time part from this?  
Version: Kibana 4.5.2 , ES 2.3.4

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [August 24, 2016, 3:45pm UTC](https://discuss.elastic.co/t/datatable-visualization-trim-the-time-from-timestamp/58773/2 "2016-08-24T15:45:06Z")

</div>

If you go to Settings \> Advanced, you can change the dateFormat from `MMMM Do YYYY, HH:mm:ss.SSS` to something like `MMMM Do YYYY`. But note that this will affect your date fields throughout all of Kibana.

But it looks like `dateFormat:scaled` is the existing setting that should automatically do what you're asking for.

"Values that define the format used in situations where timebased data is rendered in order, and formatted timestamps should adapt to the interval between measurements. Keys are ISO8601 intervals."

```auto
[
  ["", "HH:mm:ss.SSS"],
  ["PT1S", "HH:mm:ss"],
  ["PT1M", "HH:mm"],
  ["PT1H",
      "YYYY-MM-DD HH:mm"],
  ["P1DT", "YYYY-MM-DD"],
  ["P1YT", "YYYY"]
]

```

Those settings work for a line chart but not for the data table visualization.  
I think this is a bug and I created a new issue here; [https://github.com/elastic/kibana/issues/8076](https://github.com/elastic/kibana/issues/8076)  
Feel free to comment or add anything I missed.

Regards,  
Lee

---

<div class="post-metadata">

**Author:** ![sruthi](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@sruthi](https://discuss.elastic.co/u/sruthi)\
**Post date:** [August 26, 2016, 5:31am UTC](https://discuss.elastic.co/t/datatable-visualization-trim-the-time-from-timestamp/58773/3 "2016-08-26T05:31:42Z")

</div>

Thank you for the update. I wanted the date format to be changed in the datatable visualization only, not throughout kibana.  
Also am wondering whether I can achieve this through json script?  
Version: Kibana 4.5.2 , ES 2.3.4

---

<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:** [July 6, 2017, 1:40pm UTC](https://discuss.elastic.co/t/datatable-visualization-trim-the-time-from-timestamp/58773/4 "2017-07-06T13:40:14Z")

</div>


