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

[Solved] Date formatting

1 Answer 122 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Soren Michelsen
Top achievements
Rank 1
Soren Michelsen asked on 22 Sep 2009, 12:25 PM
What are the (if any) requirements for being able to have data formatted as a Date in a defined format?

In my database, a date (september 4, 2009) is stored as 20090904

How do I get this formatted as something sensible in my grid? And as something that I can filter on?

Jeppe Jespersen
Denmark

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Sep 2009, 12:47 PM
Hello Jeppe Jesperson,

You can use the DataFormatString for the required column as shown below:
aspx:
 <telerik:GridBoundColumn DataFormatString="{0:MM/dd/yyyy}" DataField="date" UniqueName="column" HeaderText="Date"
 </telerik:GridBoundColumn> 

Thanks
Princy.
Tags
Grid
Asked by
Soren Michelsen
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or