# Kibana - date format

**URL:** <https://discuss.elastic.co/t/kibana-date-format/179816>\
**Category:** Kibana\
**Created:** [May 6, 2019, 4:56pm UTC](https://discuss.elastic.co/t/kibana-date-format/179816 "2019-05-06T16:56:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francisca\_Lima](https://avatars.discourse-cdn.com/v4/letter/f/edb3f5/32.png) [@Francisca\_Lima](https://discuss.elastic.co/u/Francisca_Lima)\
**Post date:** [May 6, 2019, 4:56pm UTC](https://discuss.elastic.co/t/kibana-date-format/179816/1 "2019-05-06T16:56:11Z")

</div>

Hello,  
I am creating a scripted field in Kibana 7.0.0 and it came up this issue:  
"{"type":"illegal\_argument\_exception","reason":"Illegal list shortcut value [date]."}}}]},"status":400}"  
My scripted field is doing "doc['data'].date.year".

What can I do?  
Thanks.

---

<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:** [May 9, 2019, 3:51am UTC](https://discuss.elastic.co/t/kibana-date-format/179816/2 "2019-05-09T03:51:29Z")

</div>

@Francisca_Lima

there were some changes to the date handling in painless in 7.0. See [https://www.elastic.co/guide/en/elasticsearch//reference/current/breaking-changes-7.0.html#\_getdate\_and\_getdates\_removed](https://www.elastic.co/guide/en/elasticsearch//reference/current/breaking-changes-7.0.html#_getdate_and_getdates_removed) for details.

Instead of using the `getDate()` function with the `.date` notation, you would need to access it with `.value`, as is shown here [https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-examples.html#modules-scripting-painless-dates](https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-examples.html#modules-scripting-painless-dates)

---

<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 6, 2019, 3:51am UTC](https://discuss.elastic.co/t/kibana-date-format/179816/3 "2019-06-06T03:51:42Z")

</div>

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