In the form I use DateTimePicker like this:
With dtp_myDate
.Format = DateTimePickerFormat.Custom
.CustomFormat = "dd.MM.yyyy."
.Value = CType("16.12.2013. 11:30:25.1234", Date)
End With
Also I may use CDate instead of CType where in both cases date is expressed as string with date and time with milliseconds.
I can't change this since data comes from (not mine) database.
On machine with windows 7 that work OK but on windows XP machine I get error exception with message that this string is not valid for Date conversion.
Can this be be solved that such code work on both machines without error and how?