4.08.2013

InfoPath 2010 - DateDiff

InfoPath dates are stored in the format YYYY-MM-DD

To extract the day number of a date:
number(substring(field1, 9, 2))

To extract the month number of a date:
number(substring(field1, 6, 2))

To extract the year number of a date:
number(substring(field1, 1, 4))