Expand my Community achievements bar.

Adobe LiveCycle Designer 8 - Add days to Current Date in another text field

Avatar

Former Community Member
Hi-

I am working on an expense report. I have six fields, CurrentDate, and countDate1 through countDate5. The CurrentDate is a Time/Date field which the user can select whatever date is needed with the drop down calendar. The other five countDate fields are "text" fields which will represent Monday through Friday. I would like to add zero days to whatever the user selects as the CurrentDate and make that appear in countDate1 which represents Monday(the CurrentDate the user selects will always be a Monday), add one day to whatever the user selects as the CurrentDate and make that appear in countDate2 which represents Tuesday...and so on. I realize this is probably basic for someone familiar with FormCalc but I'm very new at this.



This got me very close but I want the user to select the date and not have the CurrentDate already filled in.



CurrentDate - DateTime field, FormCalc calculation script:

num2date(Date())



Date1 - Text field, FormCalc calculation script:

Num2Date( Date2Num(CurrentDate.formattedValue))



Date2 - Text field, FormCalc calculation script:

Num2Date( Date2Num(CurrentDate.formattedValue) + 1 )



Thanks!

Brian
14 Replies