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

changing calculation result to negative

$
0
0

I have a custom calculation script in an Acrobat form field:

var myFormat = "mm/dd/yyyy"

var startDt = this.getField("PolicyEffectiveDate").value
var endDt = this.getField("ChngDate").value

var startDate = util.scand(myFormat,startDt);
var endDate = util.scand(myFormat,endDt);

var xdays = Math.round(Math.abs((startDate.getTime() - endDate.getTime())/(86400000)))

event.value =  ((365 - (xdays)) / 365).toFixed(3) * (this.getField("AnnualPremium2").value)

 

How would I change the resulting calculation total to negative?

 

Thanks in advance for any help!


Viewing all articles
Browse latest Browse all 12130

Trending Articles



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