how fix "must have arguments of the same type"

AbbasZavar22AbbasZavar22 Member Posts: 6 Newbie
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 Certified Analyst, RapidMiner Certified Expert Posts: 803 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
    AbbasZavar22

Answers

Sign In or Register to comment.