# Dynamic date field in kibana dashboard

**URL:** https://discuss.elastic.co/t/dynamic-date-field-in-kibana-dashboard/58641
**Category:** Kibana
**Created:** [August 23, 2016, 4:09am UTC](https://discuss.elastic.co/t/dynamic-date-field-in-kibana-dashboard/58641 "2016-08-23T04:09:35Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bharath\_meka](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@bharath\_meka](https://discuss.elastic.co/u/bharath_meka)
#### Post date: [August 23, 2016, 4:09am UTC](https://discuss.elastic.co/t/dynamic-date-field-in-kibana-dashboard/58641/1 "2016-08-23T04:09:35Z")

</div>

Hi,

Is there a way to get current date in Kibana (3.x) so as to use it in a query.

For eg: In the kibana dashboard, I would like to use a query something like,

"query":  
"type : message : **[$CURRENT\_DATE]** - Initialized database browser\*"

---

<div class="post-metadata">

### Author: ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)
#### Post date: [August 23, 2016, 7:25pm UTC](https://discuss.elastic.co/t/dynamic-date-field-in-kibana-dashboard/58641/2 "2016-08-23T19:25:32Z")

</div>

You can use a date range on a date field, but I don't think there is any way to do this by replacing a variable in a string. You'd probably have to use a scripted dashboard and calculate the right date that way.

---

<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/dynamic-date-field-in-kibana-dashboard/58641/3 "2017-07-06T13:40:30Z")

</div>


