Expand my Community achievements bar.

How do you add a Day to a Date Referenced from another field

Avatar

Level 1

I tried this and all of the other Date Calcs in the other posts but can't get it to work. The field (Read Only Text or Calculated Date field:

var MyDate=xfa.resolveNode("form1.#subform.RepeatableSubform.#subform.StartDate")

if(HasValue(MyDate)) then

Num2Date( (Date2Num(MyDate.formattedValue, "EEEE, MMMM D, YYYY") + 1), "EEEE, MMMM D, YYYY")

null

endif

Any Suggestions?

1 Reply

Avatar

Level 10

Try it like this...

Num2Date( (Date2Num(MyDate.rawValue, "YYYY-MM-DD") + 1), "EEEE, MMMM D, YYYY")