Good day, I need help.
I have a datgridview Date column i would like Format "01/01/2009 23:00" and Not "01/01/2009 11:00 PM"
The closest I come is setting it to 01/01/2009 10:23 pm
I would like to display: 01/01/2009 22:23
The time is my problem, any ideas on formating the grid to show date
&time without the "PM" & in "23:00"
Please Assist.
C# Datagridview Date Column Format "01/01/2009 23:00" and Not "01/01/2009 11:00 PM"
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Nir Bar107 reputationPosted Sep 24, 2009, 10:38 AM EDT
By default the date and time are displayed using the computer's settings in the control-panel
You can specify custom display for that column by setting:
DataGridViewColumn.DefaultCellStyle.Format = "dd/MM/YYYY HH:mm"
See Custom Date and Time Format Strings
Please mark this post as answer if it helps you
Nir
Dushan Stankovic72 reputationPosted Sep 24, 2009, 10:29 AM EDT
Maybe is there another way and if enyone know please tell us.
ic ic80 reputationPosted Sep 24, 2009, 10:56 PM EDT
dgvtxbProdDte.DefaultCellStyle.Format = "dd/MM/yyyy HH:mm";