Adding 2 hours to current time
Hello all,
Im sorry if this has been asked, i have been through all the help docs and through google. i am new to Acrobat DC and am trying to create a JavaScript that adds 2 hours to the current time. I dont need the entire date, only the hours. ie. i save my form and it automatically says the time in "arrival" 2 hours from the system time. I am able to get the current time to populate with:
var f = this.getField("arrival"); f.value = util.printd("HH:MM", new Date());
and tried adding the variables i could find to add 2 hours two it. I tried using the adding the 5 days format i found in the community and tweaking it to my need to no avail:
var f = this.getField("arrival");var twohours = .83 * 24 * 60 * 60 * 1000;var theNewDate = new Date (finalTime); f.value = util.printd("HH:MM", new Date());
can anyone help?
