Automatic Julian Date/Expiration Date
I'm seeking assistance creating a custom label which includes autmatically filling in that days Julian Date (L5106 for example) and then a separate field which contains an expeiration date 420 days from that day. I've used the below script in previous labels for the expiration date, but have never calculated a Julian date. Any assitance would be much appreciated!
Validation Script:
var expFld = this.getField("Expiration");
if (event.value != "") { // check if populated else script will fail.
var d = util.scand("mm/dd/yy", event.value); // gets selected date from "Today" field
var DateNextYear = new Date(d.getTime());
DateNextYear.setDate(d.getDate() + 420);
expFld.value = util.printd("mm/dd/yy", DateNextYear); //assign future date to "Expiration" field
} else expFld.value = "";
Javascript Code:
var f = this.getField("Today");f.value = util.printd("mm/dd/yy", new Date());
