how to change macro date format?

sgnarkhede2016
sgnarkhede2016 New Altair Community Member
edited November 2024 in Community Q&A
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")
"

Answers

  • MartinLiebig
    MartinLiebig
    Altair Employee
    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

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.