how fix "must have arguments of the same type"

AbbasZavar22
AbbasZavar22 New Altair Community Member
edited November 2024 in Community Q&A
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?



Tagged:

Best Answer

  • BalazsBaranyRM
    BalazsBaranyRM New Altair Community Member
    Answer ✓
    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

  • BalazsBaranyRM
    BalazsBaranyRM New Altair Community Member
    Answer ✓
    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
    AbbasZavar22 New Altair Community Member
    Perfect, much appreciated Balázs

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.