# Kibana Watcher Current Date in e-mail subject

**URL:** <https://discuss.elastic.co/t/kibana-watcher-current-date-in-e-mail-subject/284155>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [September 14, 2021, 8:07am UTC](https://discuss.elastic.co/t/kibana-watcher-current-date-in-e-mail-subject/284155 "2021-09-14T08:07:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![piotr.krupinski](https://avatars.discourse-cdn.com/v4/letter/p/b4bc9f/32.png) [@piotr.krupinski](https://discuss.elastic.co/u/piotr.krupinski)\
**Post date:** [September 14, 2021, 8:07am UTC](https://discuss.elastic.co/t/kibana-watcher-current-date-in-e-mail-subject/284155/1 "2021-09-14T08:07:15Z")

</div>

Hello,

I need to have current date in subject in e-mail sent by Elastic Watcher at the moment I have code like below:

`"subject": " {{ctx.trigger.scheduled_time}}Exposure Report is available"`

and the Result is ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/3/f389f6a42180e911e432a99bc1b5e8077ef7de88.png)

which is not correct because my time zone is +2h to this from screenshoot.  
I would like to know if there is possiblity to somehow format date in {{ctx.trigger.scheduled\_time}}? Or maybe just take date with only YYYY-mm-dd this option is also acceptable for me, but prefered format is YYYY-mm-DD HH:mm and my time zone in Europe/Warsaw.

Regards,  
Piotr

---

<div class="post-metadata">

**Author:** ![dosant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dosant/32/64489_2.png) [@dosant](https://discuss.elastic.co/u/dosant)\
**Post date:** [October 1, 2021, 7:42am UTC](https://discuss.elastic.co/t/kibana-watcher-current-date-in-e-mail-subject/284155/2 "2021-10-01T07:42:26Z")

</div>

You can create [an "advance watch"](https://www.elastic.co/guide/en/kibana/6.8/watcher-create-advanced-watch.html) and use [context transform](https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-watcher-transform-context.html) to [format](https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-datetime.html) date

---

<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:** [October 29, 2021, 7:43am UTC](https://discuss.elastic.co/t/kibana-watcher-current-date-in-e-mail-subject/284155/3 "2021-10-29T07:43:14Z")

</div>

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