# Filename with dynamic date in node red

**URL:** <https://discourse.nodered.org/t/filename-with-dynamic-date-in-node-red/15556>\
**Category:** General\
**Created:** [15 September 2019 12:30 UTC](https://discourse.nodered.org/t/filename-with-dynamic-date-in-node-red/15556 "2019-09-15T12:30:06Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)\
**Post date:** [18 September 2019 18:19 UTC](https://discourse.nodered.org/t/filename-with-dynamic-date-in-node-red/15556/8 "2019-09-18T18:19:58Z")

</div>

FYI, here is another thread with a solution that requires _no programming_...

> [@Msg.filename logging data](https://discourse.nodered.org/t/msg-filename-logging-data/1117/13):
>
> In the spirit of "there's always another way to do it", I like to use the node-red-contrib-moment node whenever I need to format time and date strings. Here is an example of how to append the current timestamp formatted as YYYYMMDD to a static filename: [image] Just put whatever static strings you want inside [...] square brackets, set the input to be the current timestamp, and use any of [moment's many formatting directives](http://momentjs.com/docs/#/displaying/format/). In your case, you would also set the Output to msg. filename -- no …

---

_[View the full topic](https://discourse.nodered.org/t/filename-with-dynamic-date-in-node-red/15556)._
