If you're using InfoPath 2007, you can use the addDays function in a formula to do the calculation. If you're using InfoPath 2003, you'll have to use code to do the calculation. Simply subtracting 14 from a date field will not work, because date fields have a special format behind the scenes (see http://enterprise-solutions.swits.net/infopath/date-time-basics-infopath.htm).
This topic has been discussed numerous times, so you won't have difficulty finding samples on how to do this by searching this newsgroup. --- S.Y.M. Wong-A-Ton
"benlikesbikes" wrote:
[Quoted Text] > I want to set the value in one date field to automatically calculate 14 days > before another date field. I thought fieldname - 14 would do it but the > result comes up NaN.
|