Copy link to clipboard
Copied
I have a textbox that holds a time like "1:00 pm". I have another textbox below that I want to display 5 minutes added to the first box (1:05 pm). I've been looking through multiple forums trying different code, but the second text always displays "Invalid Date5". Here is the code I am using.
var dater = "1/1/2020" + " " + this.getField("Start1").value
var previousDate = util.scand("m/d/yyyy h:MM tt", dater);
previousDate.changeBy({"minutes": 5});
event.value = util.printd("m/d/yyyy h:MM tt", previousDate);
I'm very basic in Javascript so any suggestions or help would be appreciated. Thank you!
Have something to add?