Hi, I have a DataGridView (LV_PatiView) when I click any row all the values are automatically transferred to the concern text boxes.
in the data base file I have with me the column (DateofBirth) field is set to Memo, in this column I have some old cells with the date format "22/07/2011" like this, but I want the date format like this "dd-MM-yyyy" because I have set the properties of the DateTimePicker1.Value into Custom format "dd-MM-yyyy" can you tell me how can I do it.
thanks



Private Sub LV_PatiView_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles LV_PatiView.SelectedIndexChanged

Dim SelectedItems As ListView.SelectedListViewItemCollection = CType(sender, ListView).SelectedItems
If (SelectedItems.Count > 0) Then
'MessageBox.Show(SelectedItems(0).SubItems(0).Text & _
' " " & SelectedItems(0).SubItems(1).Text & _
' " " & SelectedItems(0).SubItems(2).Text & _
' " " & SelectedItems(0).SubItems(3).Text)
TxtBoxID.Text = SelectedItems(0).SubItems(0).Text
TxtBoxEMSECode.Text = SelectedItems(0).SubItems(1).Text
TxtBoxStudentName.Text = SelectedItems(0).SubItems(2).Text
TxtBoxFather.Text = SelectedItems(0).SubItems(3).Text
TxtBoxFatherOccupation.Text = SelectedItems(0).SubItems(4).Text
ComboGender.Text = SelectedItems(0).SubItems(5).Text
ComboReligion.Text = SelectedItems(0).SubItems(6).Text
MobileMaskBox.Text = SelectedItems(0).SubItems(7).Text
TxtBoxEmail.Text = SelectedItems(0).SubItems(8).Text
TxtBoxAddress1.Text = SelectedItems(0).SubItems(9).Text
TxtBoxAddress2.Text = SelectedItems(0).SubItems(10).Text
ComboCityName.Text = SelectedItems(0).SubItems(11).Text
ComboState.Text = SelectedItems(0).SubItems(12).Text

DateTimePicker1.Value = SelectedItems(0).SubItems(13).Text ' Here i have the problem





ComboNationality.Text = SelectedItems(0).SubItems(14).Text
TelephoneMaskedBox.Text = SelectedItems(0).SubItems(15).Text

Button2.Hide()
End If
End Sub