# xarray.CFTimeIndex.strftime

#### CFTimeIndex.strftime(date_format)[[source]](https://github.com/pydata/xarray/blob/main/xarray/coding/cftimeindex.py#L681-L713)

Return an Index of formatted strings specified by date_format.

The format supports the same string format as the python standard library.
Details of the string format can be found in [python string format doc](https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior).

* **Parameters:**
  **date_format** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Date format string (e.g. “%Y-%m-%d”)
* **Returns:**
  [`pandas.Index`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Index.html#pandas.Index) – Index of formatted strings

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('12bf084b-7b28-4479-81fb-bf12590b987b','ade6ba0d-6e02-43e4-87d0-f32bdc16796e','ab9d96cd-178a-4b01-9ac1-861702f2b7e5','../lite/tree/../notebooks/index.html?path=eed8ba0f_f31d_4ef0_9e3f_cc2270c08429.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> rng = xr.date_range(
...     start="2000",
...     periods=5,
...     freq="2MS",
...     calendar="noleap",
...     use_cftime=True,
... )
>>> rng.strftime("%B %d, %Y, %r")
Index(['January 01, 2000, 12:00:00 AM', 'March 01, 2000, 12:00:00 AM',
       'May 01, 2000, 12:00:00 AM', 'July 01, 2000, 12:00:00 AM',
       'September 01, 2000, 12:00:00 AM'],
      dtype='str')
```

<div id="ab9d96cd-178a-4b01-9ac1-861702f2b7e5" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('12bf084b-7b28-4479-81fb-bf12590b987b','ab9d96cd-178a-4b01-9ac1-861702f2b7e5')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('12bf084b-7b28-4479-81fb-bf12590b987b','ab9d96cd-178a-4b01-9ac1-861702f2b7e5')">Open In Tab</button></div><div id="ade6ba0d-6e02-43e4-87d0-f32bdc16796e" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
