Milliseconds to Formatted Date
I'm creating an Adobe form. Based on the data input in one field, I want to automatically update dates in other read-only fields -- some adding 1 o rmore days, some subtracting 1 or more days.
I have converted the input date string into milliseconds and added (and subtracted) the milliseconds to get to the other dates I want. How do I format the new milliseconds to MM/DD/YYYY format when they display in the other fields I'm pushing the new dates into? (i.e., user inputs 09/30/2021 and I push 10/01/2021 into other, read only, fields on the form)
Here's the code I have so far:
if(event.value) {
this.getField("Date Test Output").value = Date.parse(event.value)+86400000
}
