3 Replies Latest reply on Aug 18, 2010 9:26 AM by philmodjunk

    Date Calculations

    basilisk2

      Title

      Date Calculations

      Post

      How do I add time to a date? I have a Timestamp Date field that automatically adds today's date and time; I want to add another field that uses this date field and adds, say, a fortnight to the first date. How do I do this please? I can't believe it's as simple as writing Date + 14!

      TIA

        • 1. Re: Date Calculations
          sunmoonstar.13

          > I can't believe it's as simple as writing Date + 14

          It's almost that simple...

          If your second field is intended to show date and time, then set it up as a calculation field with this calculation...

          Your_first_timestamp_field + 1209600

          ...and set the calculation result to "Timestamp"

          (The number 1209600 is the number of seconds in a fortnight.)

           

          If, however, the second field is intended to show the date only,  then set it up as a calculation field with this calculation...

          GetAsDate ( Your_first_timestamp_field ) + 14

          ...and set the calculation result to "Date"

           

          Nick

           

          • 2. Re: Date Calculations
            basilisk2

            That's brilliant! Thanks a lot. My idea is to have a default deadline period of two weeks for any job to be done, but for this deadline date to be user changeable in case something urgent came up etc. Can I overwrite the results of calculations in this way?

            • 3. Re: Date Calculations
              philmodjunk

              Try using an auto-entered calculation. With the right options, you can probably get this to work for you.