I have a form that contains l listboxes:Close Month, Close Day, Close Year and Rollover Month, Rollover Day, Rollover Year.
The user selects the Close Month (January, February,etc), Close Day (1,2,3,etc), and Close Year form the lists provided.
I would then like to add 60 days to this date and display the calculated date in the Rollover fields. Is there an easy way to calculate dates - such as a function to pick up the date and add 60 days, without having to perform the calculation myself???
Any ideas or suggestion would be greatly appreciated - thanks in advance.
Subject: Easy Way to Calculate Date?
closedate := @Date(CloseYear; CloseMonth; CloseDay);@Adjust(closedate; 0; 0; 60; 0; 0; 0)
You can do this in a single line, of course, but I broke it into two to prevent proliferation of parentheses.
Subject: RE: Easy Way to Calculate Date?
As the user is selecting these dates via the web, is there anything else available other than formula language?
I mean, if I use this code in the Default Value of the rollover fields, then how would I get the values to refresh when the applicable dates are selected?
Thanks!
Subject: RE: Easy Way to Calculate Date?
Two thoughts:
-
Use the formula in an agent. Run it. It will refresh your document with the needed computed date.
-
Javascript. Not as simple, but operates client-side.
Hope this is useful.
Collin