[[timestring]]
== --timestring


[float]
Summary
~~~~~~~

IMPORTANT: This flag only functions within the scope of <<index-selection,index selection>> or <<snapshot-selection,snapshot selection>>.

Timestring is the pattern used for matching the dates in indices and snapshots.
You can construct date strings using
https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior[python
strftime formatting]. While it is often used in conjunction with the
<<time-unit>> flag, a timestring pattern can be used to merely match indices
with that pattern, rather than to filter by date, as with <<older-than>> or
<<newer-than>>.
Starting in v3.1.0, if you specify `--timestring` without <<older-than>> or
<<newer-than>>, the process will continue, but with a message warning you that
the operation will delete all indices with a time string, followed by a 10
second countdown timer, which provides the opportunity to cancel the operation.

[float]
Flags
~~~~~

* `--timestring` A python strftime string to match a date in one or more index
or snapshot patterns.

[float]
Example
~~~~~~~

Show indices older than 30 days matching the `--timestring` `%Y%m%d`:

-------------------------------------------------------------------------
curator show indices --older-than 30 --time-unit days --timestring %Y%m%d
-------------------------------------------------------------------------

TIP: See the <<escape-percent,FAQ>> for information about escaping the `%`
symbol in systemd setups.
