3 Replies Latest reply on Feb 15, 2010 11:59 AM by LaRetta_1

    Relation between Date and Date Range

    user21370

      Title

      Relation between Date and Date Range

      Post

      I want to make a portal with current and upcoming events. The construction I've made so far is:

       

      cDate (calculation current date)

      cDate Range (If ( IsEmpty (Date from) ; Date from ; Date from & "..." & Date till) )

       

      cDate  ≤  cDate Range

       

      With a single  From date there's no problem and everything works. But with 2 dates it doesn't work.

       

      Can someone tell me If its possible what I want? 

        • 1. Re: Relation between Date and Date Range
          LaRetta_1
            

          Hans Rein wrote:

          I want to make a portal with current and upcoming events. The construction I've made so far is:

           


          Hi Hans, since you want current and upcoming events (inclusive), I would handle it this way:

           

          Create a calculation (date ) called cToday as: Get ( CurrentDate ) ... and make it unstored in Options

          Create a global (date) called gUntil.

           

          Your relationship would then be:

           

          Main:: cToday <= PortalTable:: EventDate

          AND

          Main:: gUntil >= PortalTable:: EventDate

           

          UPDATE:  Place gUntil above your portal so Users can extend out the end date as they wish (maybe even attach a drop-down calendar for them)


          • 2. Re: Relation between Date and Date Range
            user21370
              

            Thanks for the reaction. Maybe I wasn't complete enough.

             

            The EventDate can take one or more days because it has a start and end date.

             

            I hope it clears it up a little.

             

            Thanks again 

            • 3. Re: Relation between Date and Date Range
              LaRetta_1
                

              Then the relationship should be:

               

              Main:: cToday <= PortalTable:: EventStartDate

              AND

              Main:: gUntil >= PortalTable:: EventEndDate