Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Script Help - Add to Date

$
0
0

Need a little FormCalc OR JavaScript Help from the Community.

Have a form that has three fields ...  Date Of Birth, Age, and Emancipation Date.

User Selects DOB, then I calculate Age: (Works Fine)

 

if(DOB.rawValue ne null) then

     Floor(((Date2Num(DOB.formattedValue, "MM/DD/YYYY") - Date() )/365.25)*-1)

endif

 

The Emancipation Date Field is the one I need some help with.

I need to Have that field Calculate the Date the person turns 18 if Age < 18

 

I think the easiest way is just to add "18" to the YYYY part instead of calculating it due to leap years and such.

 

Any Suggestions would be very helpful.


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>