T tqmd1 Well-known member Joined Dec 5, 2009 Messages 60 Programming Experience Beginner Jan 26, 2010 #1 Dears Datagridview column1 has data as follows 21/12/09 22/12/09 23/12/09 I want to display it in this format 21-12-09 22-12-09 23-12-09 This is datetime data type comes from table1 What Should I do?
Dears Datagridview column1 has data as follows 21/12/09 22/12/09 23/12/09 I want to display it in this format 21-12-09 22-12-09 23-12-09 This is datetime data type comes from table1 What Should I do?
D demausdauth Well-known member Joined Mar 24, 2008 Messages 281 Location Minnesota Programming Experience 3-5 Jan 26, 2010 #2 Just before you fill your datagridview. Set the Style property on the column's celltemplate. VB.NET: DataGridView1.Columns("DateColumn").CellTemplate.Style.Format = "dd-MM-yy" Upvote 0 Downvote
Just before you fill your datagridview. Set the Style property on the column's celltemplate. VB.NET: DataGridView1.Columns("DateColumn").CellTemplate.Style.Format = "dd-MM-yy"