1 Reply Latest reply on Aug 25, 2010 5:48 AM by sunmoonstar.13

    Problem with Date range find using variables

    DanParadis

      Title

      Problem with Date range find using variables

      Post

      Wow!  I've tried everything.  Once again I must be missing something simple here.  I'm trying to do a FIND on 2 global variables within a date range.  I receive an error that the "find criteria is not valid".  I tried the same find simply typing in the exact dates for the range (as a test) and it worked fine (i.e.  08/24/2010...09/24/2010 instead of $$Dt_Begin...$$Dt_End). 

      See the attached.  Any ideas?

      Thanks.

      Dan

      8-25-2010_8-13-15_AM.png

        • 1. Re: Problem with Date range find using variables
          sunmoonstar.13

          Instead of two global variables, you only need one local variable:

          Set Variable [ $_date ; Company::Dt_Begin & "..." & Company::Dt_End ]

          ...and then simply use $_date as the Find criteria.


          But if the only reason for having the two date fields is to set up the date range for the Find, then you don't need them. You could delete the Begin and End date fields and set the variable as follows:


          Set Variable [ $_date ; Get ( CurrentDate ) & "..." & Get ( CurrentDate ) + 31 ]

           

          Nick