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

How to change the date format in grid ?

2 Answers 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nikola
Top achievements
Rank 2
Nikola asked on 11 Oct 2012, 11:25 AM
Heey my question is how to change the date type in grid so that 2012-11-11-01 00:00:00 is just 2012-11-11 
is this something in codebehind or just a grid option 
thx for help 

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 11 Oct 2012, 11:41 AM
Hi Nikola,

Try setting the DataFormatString as follows.

ASPX:
<telerik:GridBoundColumn UniqueName="BoundColumn" HeaderText="BirthDate" DataField="BirthDate" DataFormatString="{0:yyyy-MM-dd}">
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn  UniqueName="DateTimeColumn" HeaderText="BirthDate" DataField="BirthDate" DataFormatString="{0:yyyy-MM-dd}" >
</telerik:GridDateTimeColumn>

Regards,
Princy.
0
Nikola
Top achievements
Rank 2
answered on 11 Oct 2012, 11:45 AM
LOL soo easy

Thanks thanks a lot
 :D
Tags
Grid
Asked by
Nikola
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Nikola
Top achievements
Rank 2
Share this question
or