2 Replies Latest reply on Sep 17, 2009 4:14 AM by joshandcar

    Subtract a variable containing a number from the Current Date

    joshandcar

      Title

      Subtract a variable containing a number from the Current Date

      Post

      I am trying to take a number of days away from the CurrentDate, using a variable for the number of days:-

       

      Set Field [database::TICK_DATE; Get ( CurrentDate ) - sysparamData Converted::CHARGE2_DAYS

       

      if I run this i just get the CurrentDate entered in the field. But if i change the line to:-

       

      Set Field [database::TICK_DATE; Get ( CurrentDate ) - 10

       

      then the date displayed is less 10 days.

       

      But i want the number of days to be a variable so the users can change this easily.

       

      TICK_DATE is a Date Field

      CHARGE2_DAYS ia a Numerical Field

       

      What am I doing wrong?.