3 Replies Latest reply on Apr 7, 2011 9:37 AM by philmodjunk

    Future Date Calculating



      Future Date Calculating


      Hi Guys
      I need to calculate future dates based on record created date.
      I have to pay some money like monthly to some account. so i want to keep track this schedule with future dates.

      what i did
      Created today (calculation (gettoday) recalculate every time, does not store the data)
      record created date - start paying
      ending date - end paying
      frequency : monthly or 3 months
      created 12 fields to calculated future dates based on record created date (this is just record created date +30)But i know this is not what i need. if i use that the dates  will changed

      What i need :
      if i created the record 1/5/2011, there is a another filed called "NEXT_day'', so The NEXT_day should be 1/6/2011.This Should automatically understand the difference of month days.
      and when the date come to really 1/6/2011, again The NEXT_day should recalculate 1/7/2011(Not sure if this works or may be i need to create another field). it does not matter if we put 12/5/2011, that also should do the same calculation with future dates.
      I have bit more question , but if i figure this i think thats easy for me to figure rest.
      How can i reach this goal. can some one help me .
      Thanks in Advance 

        • 1. Re: Future Date Calculating

          Date fields are really number fields that store the number of days since 12/31/0000. You can add and subtract them just like numbers and the displayed dates will adjust automatically when the end of a month or year is reached.

          Next_Day can simply be defined as: CreatedDateField + 1 and the return type for the calculation field can be set to return "date" as it's return type.

          IF the creation date is 3/31/2011, next day will compute and return 4/1/2011 (using MMDDYYYY date formats in this example.)

          • 2. Re: Future Date Calculating

            Hi phil , Thanks for your response. I made it work. another problem. I have attached the snap shot for your consideration.
            What i did:
            I created the Calculation field with case function. because i need to calculation based on few parameters which user has input. I think i got it work.
            My problem :
            lets say Mr X want to pay jun/1/2011 to sep/1/2011. practically 4 turns . Now i have 12 calculation fields which is calculate set of  next payment dates according to created day. If i want to see only the dates between start date and end date , what should i change in the calculation field?

            This is the Calaculation i use now

            Case ( frequency="Monthly" ; Date ( Month(startdate) +1 ; Day(startdate) ; Year(startdate) ) ;  frequency="3 Month " ; Date ( Month(startdate) +3 ; Day(startdate) ; Year(startdate) ) ; frequency="6 Month " ; Date ( Month(startdate) +6 ; Day(startdate) ; Year(startdate) ) ;0 )

            snap shots




            • 3. Re: Future Date Calculating

              I'd be inclined to use a portal for the payment dates. A script could use the frequency and a single date calculation to generate the payment dates in the portal's table.