I used BindingSource to connect my DataGridView with a Microsoft Access DB.
The field in the DB is a Time is a Long Time (Input Mask is 99:00 >LL;0;_)
The DataGridView shows
12/30/1899 9:56 AM
The time is correct but the DataGridView is showing the 12/30/1899
Please help!
you want to set the
DefaultCellStyle.Format = "t"you can display only the time via the properties window for your `datagridview’, look for the Columns option. Then select your column that you want to change > DefaultCellStyle > Format > Date Time > time option.
or in code:
here is some info on formatting data in a datagridview
How to: Format Data in the Windows Forms DataGridView Control
DataGridView.DefaultCellStyle Property