# Are we bale to create scripted field to fetch current date timestamp value

**URL:** <https://discuss.elastic.co/t/are-we-bale-to-create-scripted-field-to-fetch-current-date-timestamp-value/57850>\
**Category:** Kibana\
**Created:** [August 11, 2016, 7:17pm UTC](https://discuss.elastic.co/t/are-we-bale-to-create-scripted-field-to-fetch-current-date-timestamp-value/57850 "2016-08-11T19:17:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![prabhuramsoft](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@prabhuramsoft](https://discuss.elastic.co/u/prabhuramsoft)\
**Post date:** [August 11, 2016, 7:17pm UTC](https://discuss.elastic.co/t/are-we-bale-to-create-scripted-field-to-fetch-current-date-timestamp-value/57850/1 "2016-08-11T19:17:13Z")

</div>

Are we able to create scripted field to fetch current date timestamp value. in milliseconds

My requirement compare the field DATE1 & current date and if the difference is more than 10 mins then have to change the color of the row.

I created the scripted field for the field DATE1 like doc[DATE1].value which returns in milliSeconds

If i get the the same milliSeconds format for the Current datetime in milli second format then i can find the difference i hope

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [August 12, 2016, 6:40am UTC](https://discuss.elastic.co/t/are-we-bale-to-create-scripted-field-to-fetch-current-date-timestamp-value/57850/2 "2016-08-12T06:40:57Z")

</div>

Are you writing a plugin?

I suppose I am not following how creating a scripted field would allow you to change the color of the row.

---

<div class="post-metadata">

**Author:** ![prabhuramsoft](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@prabhuramsoft](https://discuss.elastic.co/u/prabhuramsoft)\
**Post date:** [August 12, 2016, 12:57pm UTC](https://discuss.elastic.co/t/are-we-bale-to-create-scripted-field-to-fetch-current-date-timestamp-value/57850/3 "2016-08-12T12:57:07Z")

</div>

i like to show the status column in Green/Red based on CurrentDate and DATE1 field  
for Eg., if Current Date 8/12/2016 8:53.  
Required to show data's in below format.  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/a/ac80264ae73d0395969e94bedeebd1f559a89783.png)

is there anyway to achieve this in Kibana? Please suggest

---

<div class="post-metadata">

**Author:** ![prabhuramsoft](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@prabhuramsoft](https://discuss.elastic.co/u/prabhuramsoft)\
**Post date:** [August 18, 2016, 1:11pm UTC](https://discuss.elastic.co/t/are-we-bale-to-create-scripted-field-to-fetch-current-date-timestamp-value/57850/4 "2016-08-18T13:11:03Z")

</div>

Are we able to do same like in Kibana? Any opinions?

---

<div class="post-metadata">

**Author:** ![prabhuramsoft](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@prabhuramsoft](https://discuss.elastic.co/u/prabhuramsoft)\
**Post date:** [August 31, 2016, 1:57pm UTC](https://discuss.elastic.co/t/are-we-bale-to-create-scripted-field-to-fetch-current-date-timestamp-value/57850/5 "2016-08-31T13:57:35Z")

</div>

> [@prabhuramsoft](#):
>
> ke to show the status column in Green/Red based on CurrentDate and DATE1 field

Any suggestion on displaying or changing the whole cell background color?

---

<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:39pm UTC](https://discuss.elastic.co/t/are-we-bale-to-create-scripted-field-to-fetch-current-date-timestamp-value/57850/6 "2017-07-06T13:39:52Z")

</div>


