Date Math

P

Paul Mayer

If I have two date fields MyStartDate and MyStopDate that can be set by the
date picker is it possible once MyStartDate is selected to set MyStopDate to
MyStartDate+7 days?
 
C

Clay Fox

In InfoPath 2007 they have a new function adddays() that will do what you
want to set the default.

Otherwise you have to use a script function like Datediff in VBScript. Also
if you want to calculate the difference between dates or any other thing like
that.

There are examples of the code at http://www.infopathdev.com search on
datediff
 
P

Paul Mayer

Clay:

I should have specified I am using IinfoPath 2003. I just want to be able
to select the start date for a report and have the end date be set to the
StartDate+7 day.

Paul
 

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