Jimmy,
Just resolved this myself. Basically, I frequently use a text editor to work out the formulas and functions to input into the value text box in InfoPath 2010.
However, sometimes this works and sometimes it does not. But as a tip to others, ensure that you input your functions using the 'fx' builder in the 'Set a Value' dialog box.
Evenn though the syntax of the formula in the screeenshot above is correct, InfoPath 2010 prefers if you build that function using its tools rather than cutting and pasting from a text editor.
Many thanks,
Padraic.