Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Javascript Subtracting Dates

$
0
0

First, any help that is accurate is greatly appreciated.

I am creating a form for our HR office which needs to subtract dates and turn the result into a yes or a no.  I have not done dates in JavaScript before so i am having troubles.

I have 3 fields. TerminationDate, EffectiveDate which are in mm/dd/yyyy format, and DaysResult field that is Text format. What i am trying to do is have a script in DaysResult field runs something like TerminationDate-EffectiveDate=Days. Then have If Days =or> 90 then DaysResult=YES. If Days < 90 then DaysResult=NO

Make sense?


Viewing all articles
Browse latest Browse all 12130

Trending Articles



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