# Get current timestamp in actions.yml

**URL:** <https://discuss.elastic.co/t/get-current-timestamp-in-actions-yml/68824>\
**Category:** Elasticsearch\
**Created:** [December 13, 2016, 7:55am UTC](https://discuss.elastic.co/t/get-current-timestamp-in-actions-yml/68824 "2016-12-13T07:55:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srinivas\_Mangipudi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Srinivas\_Mangipudi](https://discuss.elastic.co/u/Srinivas_Mangipudi)\
**Post date:** [December 13, 2016, 7:55am UTC](https://discuss.elastic.co/t/get-current-timestamp-in-actions-yml/68824/1 "2016-12-13T07:55:53Z")

</div>

When using curator to creates indices automatically using a cron job, how can we get the current timestamp to append in the name of the index.

This is required to create a time-based index.

---

<div class="post-metadata">

**Author:** ![Srinivas\_Mangipudi](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Srinivas\_Mangipudi](https://discuss.elastic.co/u/Srinivas_Mangipudi)\
**Post date:** [December 13, 2016, 8:05am UTC](https://discuss.elastic.co/t/get-current-timestamp-in-actions-yml/68824/2 "2016-12-13T08:05:54Z")

</div>

Just found out how to do this: use Python strftime identifiers - curator-%Y%m%d%H%M%S

details here: [https://www.elastic.co/guide/en/elasticsearch/client/curator/current/option\_name.html](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/option_name.html)

---

<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:** [January 10, 2017, 8:06am UTC](https://discuss.elastic.co/t/get-current-timestamp-in-actions-yml/68824/3 "2017-01-10T08:06:06Z")

</div>

Closed on January 10, 2017, 8:06am UTC

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