DeMaps2022
New member
- Joined
- May 14, 2022
- Messages
- 1
- Programming Experience
- Beginner
Hello,
I am using Vb.net and acess database
I have a form called creddatails which has a datagridview
my dgview is working properly and it has columns like Purchase invoice, credit amount, date, and time.
But whenever i use this code, my label shows date and time even though in the dgview, the column that i want took out the value only shows date.
my goal is to get only the date value from the dgview and transfer it to a label without time.
P.S sorry if my english is bad
I am using Vb.net and acess database
I have a form called creddatails which has a datagridview
my dgview is working properly and it has columns like Purchase invoice, credit amount, date, and time.
But whenever i use this code, my label shows date and time even though in the dgview, the column that i want took out the value only shows date.
VB.NET:
Private Sub dgview_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgview.CellContentClick
If e.RowIndex >= 0 Then
Dim row As DataGridViewRow
row = Me.dgview.Rows(e.RowIndex)
dtpur.Text = row.Cells(2).Value.ToString
End If
End Sub
P.S sorry if my english is bad