3 Replies Latest reply on Dec 11, 2012 2:31 PM by CliveB

    CliveB

    CliveB

      Title

      CliveB

      Post

           I need to calculate the number of days bewteen two dates using auto-enter. I have tried the following:-

      Days = If((IsValid(Followup_Date) and IsValid(Start_Date)), DayofYear(Followup_Date) – DayofYear(Start_Date), “ “), however when I hit Ok I get an error message regarding the second "DayofYear"  that says this function cannot be found. Can anyone out there solve this for me.

           Kind regards

           CliveB

        • 1. Re: CliveB
          hbrendel

               The 'minus' sign that you use before the second 'DayOfYear' is not a proper minus sign. This is causing the error.

               BTW you don't need that function. Substracting two dates will give you the number of days and you will not have to deal with the event that the two dates fall in different years.

               Success

          • 2. Re: CliveB
            philmodjunk

                 but make sure that the dates have been entered into fields of type date, not text. This should also eliminate any need to confirm that the dates are valid in your calculation, but you may need to add some details to handle what result you want to see when the second date field is empty.

            • 3. Re: CliveB
              CliveB

              hbrendelhank you for that, it is much appreciated

                   CliveB