Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

"Filter examples by Date"

hughesfleming68hughesfleming68 Member Posts: 323 Unicorn
edited June 2019 in Help

I am having difficulty with the Filter Examples operator with regards to filtering dates.

 

I am start off by generating a Macro to return the current date/time when I run the process. I would like to use this to filter examples prior to the current date but how to do I get from the format Mar 17,2017 12:16:18 PM CET to 03/23/2017 which the Filter examples operater expects?

 

Kind regards,

 

Alex

Tagged:

Best Answer

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,528 RM Data Scientist
    Solution Accepted

    Hi Alex,

     

    i would recommend to use the expression option in Filter Examples and write the statement there with the Generate Attribute syntax.

     

    Best,

    Martin

    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany

Answers

  • hughesfleming68hughesfleming68 Member Posts: 323 Unicorn

    Here is how I did it if anyone needs to do this.

     

    Generate Attribute with the following function expression:- date_str_custom(date_now(),"MM/dd/yyyy")

     

    Extract the Macro

     

    Filter Examples with the default "custom_filters" and add the macro.

     

    I am sure there are other ways but this did the job. Many thanks to Martin!

     

    Regards,

     

    Alex

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,528 RM Data Scientist

    Alex,

    i think you can do

    date_str_custom(date_now(),"MM/dd/yyyy")

    directly in Filter Examples.

     

    Or use Generate Macro instead of Generate Macro + Extract Macro

     

    ~Martin

    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • hughesfleming68hughesfleming68 Member Posts: 323 Unicorn

    Thanks Martin,

     

    You are right. Generating the macro is all you need. I have made the change.

Sign In or Register to comment.