Infopath:set date field to display today minus 14 days

B

benlikesbikes

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.
 
S

S.Y.M. Wong-A-Ton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top