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

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, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 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.