Avatar

Correct answer by
Level 10

Odd. Something strange about the Date2Num format. I changed them in the calculation to "YYYY-MM-DD" and it works. Note it is calculating the number of elapsed days.

if (HasValue(form1.Page1_SF.EffectDates.endDate) & HasValue(form1.Page1_SF.EffectDates.startDate)) then
$.rawValue = Date2Num(form1.Page1_SF.EffectDates.endDate.rawValue,"YYYY-MM-DD") -Date2Num(form1.Page1_SF.EffectDates.startDate.rawValue,"YYYY-MM-DD")
else
  $.rawValue = null
endif
Steve

View solution in original post