The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Wirte file with date in filename

NicsonNicson Member Posts: 18 Learner III
edited November 2018 in Help

Hi

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

Tagged:

Best Answer

  • David_ADavid_A Administrator, Moderator, Employee-RapidMiner, RMResearcher, Member Posts: 297 RM Research
    Solution Accepted

    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:

    "filename_%{date_macro}.xls"

     

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

    https://community.rapidminer.com/t5/RapidMiner-Studio-Knowledge-Base/How-to-Use-Macros/ta-p/32966

     

    Best,
    David

Sign In or Register to comment.