Adding X days to other date?

S

Sundqvist

Hello,

I have a billing form wich have a billing date and due date. I'd like to
have it like due date is always 10 days ahead of billing date. Example, I
write to billing date "22.9.2006" and I'd like due date to change
automaticaly to day "1.10.2006".

I tried "Exel trick" and I wrote an function to due date: "DATE+10" where
date is my billing date. It didnt work.

So is there any way to do this?

Thank you.
 
S

S.Y.M. Wong-A-Ton

If you're using InfoPath 2007 there is a function you can use in formulas to
add an amount of days to a date. If you are using InfoPath 2003, you'll have
to use code to get this done. Search this newsgroup to find code on how this
is done; this question has popped up many times. You can also take a look at
this article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvid/html/msdn_vidateadd.asp
or use the DateAdd function in VBScript to get it done. My website
http://enterprise-solutions.swits.net/infopath/solutions.htm#datetime also
contains some date/time solutions, but not the one you are after; it could
give you a feel for how to work with dates in InfoPath, though.
 
Top