When creating the expression you have 2 options on how to insert a document property, one of them is to insert the property as text which is what you have done by entering the expression:
DateDiff('dd',${startDate},${endDate})
the other option, and the one you need, is to insert the property as a value which is achieved thus:
DateDiff("dd",DocumentProperty("startDate"),DocumentProperty("endDate"))
If you don't think you'll remember this then you can always right click on the property when creating your expression and the 2 options will be shown to you and inserted automatically depending on your selection:
Notice as well that nothing is shown in the Resulting expression box.
Here is a quick test I done, my date data is Date rather than DateTime but it works just the same:
Further information can be gained in the Spotfire documentation.