I posted this yesterday and was given an article to read, which I did however the javascript is not working for me.
Basically, I have two datefields, start and end dates in date format (m/d/yyyy). I want to subtract the end date with the start date and add one, however I get "zero". Basically, I got this script from another posting but no response was given after it was given, whether it worked or not.
But here is the script I am currently using:
event.value = 0;var strStart = this.getField("StartDate").value;var strEnd = this.getField("DateWithdrawal").value;if(strStart.length & strEnd.length) {var Start1 = util.scand("m/d/yyyy",strStart);var End1 = util.scand("m/d/yyyy",strEnd);var diff = End1.getTime() - Start1.getTime();var oneDay = 24 * 60 * 60 * 1000;var days = Math.floor(diff/oneDay);event.value = days;}
I'm no expert in javascript so not sure if this is the right form or if I'm missing anything.
If someone can shed some light, would be nice.
Cheers,
Gilbert
For what it's worth, the Adobe forums have been very flakey recently.