This is a migrated thread and some comments may be shown as answers.

show date instead of datetime

1 Answer 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Savyo
Top achievements
Rank 1
Savyo asked on 08 Nov 2012, 10:47 AM
Hi,
My db contains a field date of birth. Its of type datetime. But in grid I want to show only the date. Im using boundcolumn for displaying dob. Can you provide a solution.

thanks in advance
Savyo

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 08 Nov 2012, 10:56 AM
Hi,

Try setting the DataFormatString property for the column as shown below.
aspx:
<telerik:GridBoundColumn DataField="Date"  DataFormatString="{0:d}" ></telerik:GridBoundColumn>

Thanks,
Shinu.
Tags
Grid
Asked by
Savyo
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or