Question: how to calculate date difference in infopath?
Answer: Assuming the date is stored as DateTime, you can use this formula: floor(number(translate(substring-before(../my:endDate, "T"), "-", ""))) Query the list for the number value of the first date. Store this number in a field (column) in your form.