# Canvas Time Filter not using correct date format

**URL:** <https://discuss.elastic.co/t/canvas-time-filter-not-using-correct-date-format/151175>\
**Category:** Kibana\
**Created:** [October 5, 2018, 9:00am UTC](https://discuss.elastic.co/t/canvas-time-filter-not-using-correct-date-format/151175 "2018-10-05T09:00:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FWerner](https://avatars.discourse-cdn.com/v4/letter/f/57b2e6/32.png) [@FWerner](https://discuss.elastic.co/u/FWerner)\
**Post date:** [October 5, 2018, 9:00am UTC](https://discuss.elastic.co/t/canvas-time-filter-not-using-correct-date-format/151175/1 "2018-10-05T09:00:53Z")

</div>

Hi Guys,

This is my first post here 🙂 I am trying to get Canvas to work with my Timelion expression. I am using ES 6.4.2.

In Timelion, my query  
`.es(q=*, index=att*_touchpoints, timefield=fields.timestamp)`  
gives me a nice timeseries. I am using fields.timestamp as a custom timefield.

Using the same expression in Canvas seems to work fine. I am using a simple table like this:  
`timelion query=".es(q=*, index=att*_touchpoints, timefield=fields.timestamp)"`  
This gives me a nice table. Awesome! But now, I want to filter on a date with the time filter. So I define my custom time field there as well:  
`timefilterControl compact=true column="fields.timestamp"`

But now, as I try to pass this filter to my datatable, things go wrong. If I use  
`filters | timelion query=".es(q=*, index=att*_touchpoints, timefield=fields.timestamp)"`  
I end up with an exclamation mark, telling me my request failed with status code 500. In ES, I see this error:  
`ElasticsearchParseException: failed to parse date field [2018-10-04T08:55:49.143Z] with format [epoch_second]`

My mapping for the fields.timestamp field looks like this:  
"timestamp": {  
"type": "date",  
"format": "epoch\_second"  
}

I am not sure if I'm missing something obvious here, but I just can't get this to work. This is a showstopper for me, as all my timestamps are in epoch\_second format. Any help is highly appreciated!

Best regards,  
Frederik

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [October 11, 2018, 1:11pm UTC](https://discuss.elastic.co/t/canvas-time-filter-not-using-correct-date-format/151175/2 "2018-10-11T13:11:21Z")

</div>

@Catherine_Liu - This is the ticket I mentioned about Canvas.

Thanks  
Rashmi

---

<div class="post-metadata">

**Author:** ![FWerner](https://avatars.discourse-cdn.com/v4/letter/f/57b2e6/32.png) [@FWerner](https://discuss.elastic.co/u/FWerner)\
**Post date:** [October 11, 2018, 1:45pm UTC](https://discuss.elastic.co/t/canvas-time-filter-not-using-correct-date-format/151175/3 "2018-10-11T13:45:53Z")

</div>

Just another thing I tried out of desperation: When I use another index with a date format "epoch\_second||date\_time||strict\_date\_time", Elasticsearch still throws an exception but Canvas gets a result.

---

<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:** [November 8, 2018, 1:46pm UTC](https://discuss.elastic.co/t/canvas-time-filter-not-using-correct-date-format/151175/4 "2018-11-08T13:46:00Z")

</div>

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