use something like:
number(my:field1) - number(my:field2)
Although it might work without it, it is safest to use the number() function so that you guarantee that you are subtracting numbers.

Signature
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com
Hi, How can I use a subtraction function between two fields?
In the function list I see only sum function and other but not the
subtraction...
Thank you,
Gabriele Fabbri.