I got the following error when trying to retrieve the data to the datetime picker control when clicking on the datagridview row.
Dim i as byte
i = tblView.CurrentRow.Index
txtEnterDate.Text = tblView.Item(2, i).Value
txtPubYear.Text = tblView.Item(3, i).Value
The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.
How can this be fixed?
It sounds as through there’s a DateTimePicker involved, and there’s a validated date already in
Item(2,i)Try this: