Question Date Format

tqmd1

Well-known member
Joined
Dec 5, 2009
Messages
60
Programming Experience
Beginner
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?
 
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"
 

Latest posts

Back
Top