# Logstash - csv output plugin - path - today's timestamp filename

**URL:** <https://discuss.elastic.co/t/logstash-csv-output-plugin-path-todays-timestamp-filename/118498>\
**Category:** Logstash\
**Created:** [February 5, 2018, 5:19pm UTC](https://discuss.elastic.co/t/logstash-csv-output-plugin-path-todays-timestamp-filename/118498 "2018-02-05T17:19:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [February 5, 2018, 5:19pm UTC](https://discuss.elastic.co/t/logstash-csv-output-plugin-path-todays-timestamp-filename/118498/1 "2018-02-05T17:19:51Z")

</div>

I'm utilizing [Csv output plugin | Logstash Reference](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-csv.html#plugins-outputs-csv-path) for my output.

I'd like to see today's date in my filename (i.e. file-2018-02-05), so I've tried using following:

> /path/file-%{+YYYY-MM-dd}.txt

however, few files were generated as this use event's `@timestamp`, rather then today's date...

Please advise.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 5, 2018, 9:25pm UTC](https://discuss.elastic.co/t/logstash-csv-output-plugin-path-todays-timestamp-filename/118498/2 "2018-02-05T21:25:25Z")

</div>

The `%{+YYYY-MM-dd}` notation always uses the date from `@timestamp`.

---

<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:** [March 5, 2018, 9:25pm UTC](https://discuss.elastic.co/t/logstash-csv-output-plugin-path-todays-timestamp-filename/118498/3 "2018-03-05T21:25:40Z")

</div>

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