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 fix "must have arguments of the same type"

AbbasZavar22AbbasZavar22 Member Posts: 6 Learner I
Hi there,

I wanna calculate the range between two dates less than 3 months:
I made it as

if(date_diff(PerformedDate,LatestDate<7,776,000,000),1,0)

3 months = 7,776,000,000 milisec

But I get an error as "must have arguments of the same type"
Both date are the same date format.

Any recommendations?



Best Answer

  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Solution Accepted
    Hi!

    date_diff() takes two date/time attributes. You are passing "LatestDate<7" as the second parameter, that would be a boolean result.

    This would be a syntactically correct form of the formula:
    if(date_difff(PerformedDate, LatestDate) < 7776000000), 1, 0)

    Numbers must be specified without the thousands separators in the formula.

    Regards,
    Balázs

Answers

Sign In or Register to comment.