RapidMiner now offering a 30 day free trial of RapidMiner Studio Large! Learn more

Wirte file with date in filename

Contributor II Nicson
Contributor II

Wirte file with date in filename


is there a possibility to automatically integrate the current date into the file name when saving files (e. g. write excel)?

As an example, the file should be called "filename_yymmdd.xls".


Best regards

RM Research
RM Research

Re: Wirte file with date in filename

Hi Nicson,


you can integrate the name by using a macro.

By default, each process has a macro called process_start, which has the following format "2018_03_13-AM_11_12_01", which might be a bit long.

With the Generate Macro, you can use String manipulation to shorten it to the first 10 characters, if you are only interested in the data. Alternatively you can use the data_now() function and extract the parts of the date you need.

To add the macro to you just add it to your desired file name with the %{macro_name}  syntax. In case this could look like that:



There is also a very good knowledge base about macros available if you want to learn more:




Senior Data Scientist at RapidMiner research team
ezCater's RapidMiner Journey