# xarray.CFTimeIndex.strftime

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

Return an Index of formatted strings specified by date_format, which
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('6d733a8c-3a55-4aba-be0f-7a377758dfea','fd75b45c-13e4-4d4d-9e4e-f87a8ba52a17','ed1e8f08-79ec-4816-9c75-798809bbe3ab','../lite/tree/../notebooks/index.html?path=4835c83f_666e_4479_9568_88df70eb25b8.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="ed1e8f08-79ec-4816-9c75-798809bbe3ab" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('6d733a8c-3a55-4aba-be0f-7a377758dfea','ed1e8f08-79ec-4816-9c75-798809bbe3ab')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('6d733a8c-3a55-4aba-be0f-7a377758dfea','ed1e8f08-79ec-4816-9c75-798809bbe3ab')">Open In Tab</button></div><div id="fd75b45c-13e4-4d4d-9e4e-f87a8ba52a17" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
