To pull the data value from a field, you need to use the "rawValue" property of the field. For example, if the name of your date field is SubForm_DateField01: var firstDate = new Date(SubForm_DateField01.rawValue);The Math.abs function is causing the negative number to become positive. To fix,...