how to change macro date format?

sgnarkhede2016sgnarkhede2016 Member Posts: 136 Contributor II
edited August 2020 in Help
hello,

I have macro that contain current date i wnat to change date format to "MM/dd/yyyy"
how can i do that?
e.g
%{current_date}  
Aug 21, 2020 1:13:49 PM IST

and one other date i need to compare with this macro is InputDate 
Aug 21, 2020 1:13:49 PM IST
when i checked this condtion getting " F" results for all "if(INPUTDATETIME==%{current_date},"T","F")
"
Tagged:

Answers

  • mschmitzmschmitz Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,233 RM Data Scientist
    Hi,
    What you want to do is either parse the macro to a date or the date to a string in your if statement. Those are date_str and date_parse.

    I recommend to use Extract Macro (Format) as an operator. That allows you to set the format of the macro.

    Best,
    Martin
    - Head of Data Science Services at RapidMiner -
    Dortmund, Germany
    MNNikiforosPavithra_Rao
Sign In or Register to comment.