VAN VAN - 1 year ago 171
MySQL Question DateTimePicker remove time 12:00:00 AM

im having a problem when viewing date on my listview.

on my SQL its okay that on my column "2016-28-11" that is fine
but when i view it on my listview in it said that "2016-28-11 12:00:00 am"

on my datetimepicker

Value: 11/28/2016
custom format: yyyy-MM-dd
format: custom

when i save the date it adds that time. can anyone help me?

Answer Source

When you add the date in your listview just use something like that:

 Dim NewItem As New ListViewItem
 NewItem.Text = "My Item"

Just keep in mind mydate.tostring("yyyy-MM-dd") where mydate is a datetime.

Considerate your comments, here is the code:

Dim MyDate As DateTime = Date(ds.Tables("studnum").Rows(i).Item(5).ToString)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download