Question

I am trying to calculate the difference between two date picker fields which should result the value in number of days in infopath.

I tried number(substring(field1, 9, 2)) - number(substring(field2, 9, 2)) but it calculates on the different in dates and does not consider month. If the field one is 5th May 2020 and field 2 is 6th Jun 2020, it still gives the difference as 1.

Can anyone help by suggesting how can this be achieved?

Thank you.

Was it helpful?

Solution

There are two possible solutions to your problem :

  1. Using qrules(not free)

  2. Use rules, conditions, and the number(), floor(), and substring() functions in formulas to calculate the difference between two date picker controls in InfoPath.

You can read more about it in below question on forum:

Help please-Solve: Number of days = (todays date - date initiated)

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top