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

Calculating a new date: adding days then subtracting a variable.

$
0
0

Hello:  I'm a newbie to javascript and have a little experience with LiveCycle.

 

I'm working on a form which will allow an applicant to calculate an approximate graduation date if they're getting an Associates Degree.  They enter their start date (Start_Date) and total credits earned to date in another field.  The Credits field returns a variable which reduces the graduation date.  So, I need to take the Start_Date, add 1068 days (which is 35 months converted roughly to days), then subtract the variable calculated from the Credits field and display an estimated graduation date.  I have tried many different ways of doing this based on examples I've found, and though LiveCycle says the syntax is OK, nothing will display in the field.  I hope this makes sense.  I'm taking a relatively simple Excel "calculator" and adding it to this form, but I just don't know enough about Javascript to get it to work. 

 

I hope this makes sense.  I need:

 

1. User enters Start Date & Credits Earned

2. Associates Degree field would calculate Start Date + 1068 days (~35 months from the date entered)

3. If any credits have been earned to date, a variable (converting credits earned to a number of days, which I already have calculating correctly in a hidden field) would be subtracted

 

Start Date + 1068 days - Variable = Graduation Date

 

Any help would be appreciated.


Viewing all articles
Browse latest Browse all 5571

Trending Articles



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