I have attached a script, a xml file and a screen shot showing the setup :
Script.txt - the script allows you to calculates the difference between the dates. Please try and modify it with to suit your needs.
Sales confirmation.xml - XML file for you to use that has the different dates, this will work in conjunction with the script I have attached.
DaysToDeliveryDate.zip Added another Lasernet 8 example configuration calculating the difference between 2 dates on line level in data.