I have now found out it is to do with date formating.

Dim startDate As String = Format dtpAdjEdtDiscStartDate.Text, "dd,mm,yyyy")


This seems to return at string containing "DDMMYYYY" not a date.

I have tried using a date instead of a String but I get a invalid cast exeption.

Thanks for helping (once again).