# ES Curator Date

**URL:** <https://discuss.elastic.co/t/es-curator-date/124117>\
**Category:** Elasticsearch\
**Created:** [March 15, 2018, 2:50pm UTC](https://discuss.elastic.co/t/es-curator-date/124117 "2018-03-15T14:50:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben96](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ben96/32/28334_2.png) [@Ben96](https://discuss.elastic.co/u/Ben96)\
**Post date:** [March 15, 2018, 2:50pm UTC](https://discuss.elastic.co/t/es-curator-date/124117/1 "2018-03-15T14:50:00Z")

</div>

Hi,

I just started Creating & Deleting indices with Curator.

I would like to create the indices of the next month but when i'm doing this in my action file :

```
       name: '<toto-{now/M+1M}>'

```

If i take the current date : YYYY.MM.dd, we are : `2018-03-15`

Curator create indices with this date : `2018-04-01`

i would like this to be : `2018-04-15`

I'm a newbie in curator so if anyone could explain how it works, this could be great 🙂

Regards, Ben

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [March 15, 2018, 4:24pm UTC](https://discuss.elastic.co/t/es-curator-date/124117/2 "2018-03-15T16:24:21Z")

</div>

This is just a wild guess...

Your `/M` will return only whole months. Kind of which month are you in, which is 3. 3+1 = 4.

The index is created for the start of the 4th month.

Just `+1M` should add one month to `now`.

---

<div class="post-metadata">

**Author:** ![Ben96](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ben96/32/28334_2.png) [@Ben96](https://discuss.elastic.co/u/Ben96)\
**Post date:** [March 16, 2018, 7:17am UTC](https://discuss.elastic.co/t/es-curator-date/124117/3 "2018-03-16T07:17:39Z")

</div>

HI @A_B

Thanks for your quick reply,

I tried what you tell me before, but i got a syntax error, i'm maybe wrong in the configuration file 🙂

```
<'toto-{now/+1M}>'  

```

Return a syntax error (+) is unknown

> 'unit [+] not supported for date math [/+1M]'

So i delete the "+" but index is created at this date :` 2018-03-01`

Maybe you know what kind of mistake i'v make.

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [March 16, 2018, 7:47am UTC](https://discuss.elastic.co/t/es-curator-date/124117/4 "2018-03-16T07:47:59Z")

</div>

Did you try `<'toto-{now+1M}>'`? Still haven't looked at documentation so also a guess...

---

<div class="post-metadata">

**Author:** ![Ben96](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ben96/32/28334_2.png) [@Ben96](https://discuss.elastic.co/u/Ben96)\
**Post date:** [March 16, 2018, 9:25am UTC](https://discuss.elastic.co/t/es-curator-date/124117/5 "2018-03-16T09:25:20Z")

</div>

Thanks a lot ! You were right that was that `<toto-{now+1M}>`

Thanks for helping me dude !

---

<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:** [April 13, 2018, 9:25am UTC](https://discuss.elastic.co/t/es-curator-date/124117/6 "2018-04-13T09:25:21Z")

</div>

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