Datediff Beastmode Help

ShaneB
ShaneB Member
edited November 2022 in Beast Mode

I am attempting to write a beastmode that will give me all cases (tickets) that have not been updated within the last two or more days. Here is the beastmode I am attemping to create but get asyntax error. Can anyone advise?

 

 

(case when DATEDIFF(`Current Date`, `Date Last Updated`) >= 2 end)

 

Thanks

Best Answer

  • Property_Ninja
    Property_Ninja Contributor
    Answer ✓

    Hi Shane,

     

    I think you are just missing the THEN and ELSE part of the syntax

     

    (case when DATEDIFF(`Current Date`, `Date Last Updated`) >= 2 end)

     

    vs.

     

    (case when DATEDIFF(`Current Date`, `Date Last Updated`) >= 2 THEN 'true' ELSE 'false' end)

     

    Then you can filter on true.

     

    Hope this helps,

     

    Brian


    **Please mark "Accept as Solution" if this post solves your problem
    **Say "Thanks" by clicking the "heart" in the post that helped you.

Answers

  • Property_Ninja
    Property_Ninja Contributor
    Answer ✓

    Hi Shane,

     

    I think you are just missing the THEN and ELSE part of the syntax

     

    (case when DATEDIFF(`Current Date`, `Date Last Updated`) >= 2 end)

     

    vs.

     

    (case when DATEDIFF(`Current Date`, `Date Last Updated`) >= 2 THEN 'true' ELSE 'false' end)

     

    Then you can filter on true.

     

    Hope this helps,

     

    Brian


    **Please mark "Accept as Solution" if this post solves your problem
    **Say "Thanks" by clicking the "heart" in the post that helped you.