2 Replies Latest reply: Oct 22, 2014 12:07 PM by Marco Wedel RSS

    If Greater Than Today

    Myles Holland

      Hello all,

       

      Had a quick question regarding making a slight tweak to a script. I wish to filter on anything greater than today's date. Here is my existing script that basically just says today.

       

       

      if( (([Project.Revised Date]-today()=-0) AND Project.Flag=0), 1)

       

       

      Also, is it possible to change the script to allow for any date greater than December 31, 2014?

       

      Regards,

       

      M

        • Re: If Greater Than Today
          Jonathan Poole

          You have 2 conditions in there . Only one refers to date. You can replace the first one to filter for Dates > Today as follows. 

           

          if( ((    [Project.Revised Date] > today()) AND Project.Flag=0), 1)


          For your 2nd question you can use makedate() function to compare to a constant:


          if( ((    [Project.Revised Date] > MakeDate(2014,12,31)) AND Project.Flag=0), 1)

          or consider the last day of today's year:

          if( ((    [Project.Revised Date] >yearend(today())) AND Project.Flag=0), 1)

          • Re: If Greater Than Today
            Marco Wedel

            if([Project.Revised Date]>today() AND not [Project.Flag], 1)