3 Replies Latest reply on Apr 7, 2007 10:44 PM by BKBK

    dateadd function

    JohnGree Level 1
      Hi i am using date add function, looping through form values, but i have one problem,

      the orginal date in the loop ie

      if i select date 10/12/2007 and
      a frequency of ww
      and 2 cycles

      my output is 17/12/2007, 24/12/2007

      so i need the orginal to be outputted aswell?

      <cfset startday = '#form.SMS_Date#'>

      <CFLOOP INDEX="cnt" FROM="1" TO="#form.cycles#">
      <CFSET nextday = DateAdd("#form.Frequency#", 1, startday)>
      <CFSET startday = '#DateFormat(nextday, "dd/mm/yyyy")#'>