I am populating one DataGridView in C# windows application. I have one DataTable in which I am displaying dates which I retrieve from database. My problem is, dates that I am getting from database includes time information also. For example: Jan 2003 12:00:00 AM.
I want to show only the year and month (Jan 2003) part of that date in cells of datatable. I tried to change the culture information of current thread, but it didnt worked. Is there any other way to achieve this?
I am using MySQLas my database and there I have set datatype of this column as DATE, but I am still getting this time information. Can anyone explain this behavior of MySQL as well?
Set the Format property on your column to the Month/Year format specifier: