how to change macro date format?

sgnarkhede2016sgnarkhede2016 Member Posts: 152 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

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,503 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
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
Sign In or Register to comment.