Assuming you have the dates in VB, they should be in DateTime values.
So...
Dim diff As Timespan = realDeliveryDate - confirmedDeliveryDate
If you don;t have them as DateTime values, then convert them to DateTime using DateTime.TryParse
If they are in SQL, then again, they should be DATE or DATETIME columns, in which case
SELECT DATEDIFF(dd, realDeliveryDate, confirmedDeliveryDate) FROM MyTable
Where "dd" selects days (but see DATEFIFF for other options).
If they are stored in SQL as strings, then change your datasbe to use DATE or DATETIME columns instead as it will only cause major hassles if you don't!