3 Replies Latest reply on Apr 21, 2010 5:14 AM by comment_1

    searching for dates

    Jacques

      Title

      searching for dates

      Post

      I have spend several days trying to come with a script to sort out dates between a Start date and an End date. The Start date is set by the user, the End date is always Today.

       

      The database has the following records:

      money    date

      $2000    aug 1 2009

      $1200    apr 9 2009

      $1100    feb 1 2010

      $3000    sep 8 2009

      $500      apr 1 2010

       

      So a value of $2000 is active from aug 1 2009 til sep 8 2009

      The date set by the user will be jan 1 2010, The report should have all dates between jan 1 2010 and today.

       

      The end result should look like:

      $3000    sep 8 2009

      $1100    feb 1 2010

      $500      apr 1 2010

       

      As jan 1 2010 is inbetween sep 8 2009 and feb 1 2010 then sep 8 2009 should be included in the list.

       

      Hope that soneone has an answer for me.

       

      Regards,

      Jacques

       

       

       

        • 1. Re: searching for dates
          comment_1

          Try something like:

          Enter Find Mode [  ]
          Set Field [ date; "≤" & gStartDate ]
          Perform Find [  ]
          Sort Records [ date; ascending ]
          Go to Record/Request/Page [ Last ]
          Omit Record
          Show Omitted Only
          Sort Records [ date; ascending ]





          • 2. Re: searching for dates
            Jacques

            Thank's for the quick reply.

             

            Your sollution gave me some new ideas, it works great when searching the whole database.

            I'm also trying to let it work with child records and one parent database.

             

             

            Regards,

            Jacques

            • 3. Re: searching for dates
              comment_1

               


              Jacques wrote:

              I'm also trying to let it work with child records and one parent database.


               

              I am not sure what you mean. If you want to restrict the found set to children of a specific parent, you can add a Constrain Found Set at the end.