Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / June 2007

Tip: Looking for answers? Try searching our database.

Field Validation using dates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Art - 14 Mar 2007 14:05 GMT
I think I know the answer but want to ask anyay  :)

Using Infopath 2003.

I have a field that I want to be required is a 'Needed by Date" is less than
10 days from today.

Is there a way to compare today and the Date needed by to get the 10 day
window without writing script?
S.Y.M. Wong-A-Ton - 19 Mar 2007 09:13 GMT
Not sure whether you want to add or subtract 10 days, but assuming you want
to add 10 days, you might be able to add 10 days to today using the
substring() function to extract the day and add 10 days to the day, and then
use conditions to check whether the calculated date falls in the following
month or not. But the logic would soon become too complex and things like
testing for a leap year using rules and conditions when your date falls in
February would be a nightmare.

Solution: Use code for date calculations like this one.
---
S.Y.M. Wong-A-Ton

> I think I know the answer but want to ask anyay  :)
>
[quoted text clipped - 5 lines]
> Is there a way to compare today and the Date needed by to get the 10 day
> window without writing script?
Art - 23 Mar 2007 16:27 GMT
I think it will be easier to get my network guys to upgrade to IP 2007  than
to teach me code  :)

> Not sure whether you want to add or subtract 10 days, but assuming you
> want
[quoted text clipped - 20 lines]
>> Is there a way to compare today and the Date needed by to get the 10 day
>> window without writing script?
S.Y.M. Wong-A-Ton - 28 Mar 2007 02:17 GMT
You might not entirely escape coding! While InfoPath 2007 has date functions
to add days and seconds, it does not (yet) have date functions to calculate
the difference between dates, so for the latter you will have to resort to
code. I've put in a request for the latter, but perhaps if more people voted
for a date difference function to be added to InfoPath, my request would have
more weight...
---
S.Y.M. Wong-A-Ton

> I think it will be easier to get my network guys to upgrade to IP 2007  than
> to teach me code  :)
[quoted text clipped - 23 lines]
> >> Is there a way to compare today and the Date needed by to get the 10 day
> >> window without writing script?
Jono - 06 Jun 2007 21:14 GMT
Where do I vote? Are there other functions that can be voted on?

> You might not entirely escape coding! While InfoPath 2007 has date functions
> to add days and seconds, it does not (yet) have date functions to calculate
[quoted text clipped - 32 lines]
> > >> Is there a way to compare today and the Date needed by to get the 10 day
> > >> window without writing script?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.