30-03-19, 07:47 PM
إضافة الى ما قدمه اخونا [b]asemshahen5 [/b]
[b] [/b]
[b] [/b]
كود :
Private Sub DataGridView1_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting
If e.ColumnIndex = 4 Then 'your column
Dim d As Date
If Date.TryParse(e.Value.ToString, d) Then
e.Value = d.ToString("yyyy/MM/dd")
e.FormattingApplied = True
End If
End If
End Sub
