8 Replies Latest reply on May 18, 2009 6:03 PM by claddam

    Search between dates

    claddam

      Title

      Search between dates

      Post

      Is there anyways to search between dates?

       

      For example, each record has a date, and I've created a summary layout and I want to display data for a certain month or between dates.

       

      Can anyone help please?

       

      Thanks in advance

        • 1. Re: Search between dates
          philmodjunk
            

          There's a number of different approaches for pulling up all records that fall on a certain date interval.

           

          Entering 5/1/2009...5/31/2009, into your date field while in find mode will locate all records dated in the month of May, 2009.

           

          Other, more sophisticated approaches are possible. It depends on what you want to do.

          • 2. Re: Search between dates
            claddam
              

            Thanks Phil, that's helpful :)

             

            Another question, in each record is 2 sets of information.

             

            Let's say one date for when they arrive at the hotel and one date when they leave the hotel.

             

            Is there anyway to do a search on two dates in one record?

             

            Thanks

            • 3. Re: Search between dates
              philmodjunk
                

              Well, you can certainly search on any number of different fields of all types at the same time. How you set up the request determines how all the different criteria interact to pull up your found set of matching records.

               

              Perhaps you can be more specific as to how you want to search on two different dates?

               

              Keep in mind that date fields are really number fields that count the number of days since 0/0/00 or thereabouts. Thus "> 5/1/2009" will find all records more recent than 5/1/2009.

              • 4. Re: Search between dates
                comment_1
                  

                claddam wrote:

                Is there anyway to do a search on two dates in one record?


                Yes: you just need to make a new request and repeat the same criteria for the second field. Scripted, it would look something like:

                 

                Enter Find Mode []

                Set Field [ ArrivalDate ; startDate & ".." & endDate ]

                New Record/Request

                Set Field [ DepartureDate ; startDate & ".." & endDate ]

                Perform Find []

                 

                However, you won't be able to sort the found records by the RELEVANT date (IIRC, we have been through this before). Also, if a record meets both criteria, it will still remain only one record.


                • 5. Re: Search between dates
                  claddam
                    

                  Thanks guys for the help.

                   

                  One More thing - Is it possible to break down the date?

                   

                  Example - the date is 05/21/2009, is it possible to break it down into 3 fields that say Month, Day and Year?

                   

                  Thanks 

                  • 6. Re: Search between dates
                    comment_1
                      

                    claddam wrote:

                    the date is 05/21/2009, is it possible to break it down into 3 fields that say Month, Day and Year?


                    Have a look at the functions that are named exactly as you have guessed.

                     

                     

                    ---

                    Note that I am assuming you are talking about a DATE - not a text string in the form of "05/21/2009".


                    • 7. Re: Search between dates
                      claddam
                         Correct, it is a drop down date box and I want to break up the date into 3 seperate fields :)
                      • 8. Re: Search between dates
                        claddam
                           Problem solved.

                        Kudos to you guys for your help.
                         
                        Muchly appreciated.