3 Replies Latest reply on Apr 6, 2011 3:01 PM by philmodjunk

    2 dates in same record are being added together

    JKH

      Title

      2 dates in same record are being added together

      Post

      When I have multiple dates in the same record displayed on a layout, the fields are being added.  For example, today is the 96th day of 2011 - when I show 2 or more dates the field contents are "9696", or 2 occurences of todays date displayed as Day of Year.   My problem is the dates are used in calculations and this is throwing off my results.  I know I could just create a record for each date but I need both dates (or muliple dates) to appear on the layout at the same time.   How do I keep this from happening?   Also, this is a single table DB - that displays the appropiate action which is determined by client and date.

        • 1. Re: 2 dates in same record are being added together
          philmodjunk

          What do these dates represent?

          The simplest way to record a flexible number of items of the same type of data is to use a portal to a related table where you can have a separate related record (portal row) for each time you choose to record such data.

          For example, today is the 96th day of 2011 - when I show 2 or more dates the field contents are "9696", or 2 occurences of todays date displayed as Day of Year.

          What do you mean by "show 2 or more dates"? How does the "9696" get entered into this field? By an auto-enter calculation? A Script? or?

          BTW, if the day number is useful to you, that can be calculated as you are doing, but it is not necessary in order to compute the number of days between dates.

          • 2. Re: 2 dates in same record are being added together
            JKH

                                       Hey Phil, appreciate your time.  The table has client and dates.  Each client has 3 date fields that represent 3 different status levels.  (Holiday, Extended Processing or Hold Open)   When I look at my layout the DB tells you the date, DayofYear, and if any of these 3 status levels are current.   (Like today is a holiday for Client x)   Yes, the DayofYear is an autocalc.   If on a given day a client fits into more then 1 of these fields, I am getting the "9696"   The "9696" is - today this client fits into 1 status, and then it fits into a second status - so you have under DayofYearAsNum 96 for the first condition, then 96 for the second.   If a client met all 3 conditions the DayofYearAsNum would incorrectly read "969696".   Your first comment confused me a little.   All this info is static, it won't change untill 2012. 

            • 3. Re: 2 dates in same record are being added together
              philmodjunk

              Please post the calculation expression you are using.