2 Replies Latest reply on May 26, 2013 11:30 AM by TorbenPoulsen

    date range

    TorbenPoulsen

      Title

      date range

      Post

            

           Hi
           i would like some help with finding records within date range.
           I would like to check if date field is within last 6 months from todays date. If true set check field to 1 or of false set field to 0.
            
           I have tried with IF and Case but it seams like they dont work with range.
           my calculation looks like this:
           Case (record checked=GetAsText(Get( CurrentDate ) - 183 ) & "..." & GetAsText(Get( CurrentDate ) - 1 );1;0)
            
           But it always return 0
            
           What do i do wrong

        • 1. Re: date range
          GuyStevens

               The date range you are using where you heve two dates with three dots in between them is actually a find operator.

               You use it while performing a find, but not in a calculation.

               From the top of my head, assuming your Date field is called "Date" it should be more like:

               If (
               Date  ≥ Get (CurrentDate ) - 183
               and
               Date  ≤ Get (CurrentDate ) ;
               1;
               0
                )

          • 2. Re: date range
            TorbenPoulsen

                 DaSaint

                 Thanks a lot it works

                  

                 Torben