This is a migrated thread and some comments may be shown as answers.
Templeate column lable Date Format
5 Answers 10 Views
This is a migrated thread and some comments may be shown as answers.
Rahul
Top achievements
Rank 1
Rahul asked on 06 Mar 2014, 12:39 PM
I want to set date format to template column same like below

2/28/2014 11:54:42.832921 AM


Please help me how to set date format like this.

Thanks in davance

5 Answers, 1 is accepted

Sort by
0
Rahul
Top achievements
Rank 1
answered on 06 Mar 2014, 01:02 PM
It's bound column sorry how to set date form for bound column
0
Accepted
Princy
Top achievements
Rank 1
answered on 07 Mar 2014, 05:02 AM
Hi Rahul,

Please try the following code snippet to set the date for a BoundColumn.

ASPX:
<telerik:GridBoundColumn DataField="OrderDate" HeaderText="OrderDate" UniqueName="OrderDate"
 DataType="System.DateTime" DataFormatString="{0:G}" />

Thanks,
Princy
0
Rahul
Top achievements
Rank 1
answered on 12 Mar 2014, 08:04 AM
No still not working still it giving same. Not able to display form like this  2/28/2014 11:54:42.832921 AM
0
Rahul
Top achievements
Rank 1
answered on 12 Mar 2014, 08:14 AM
Please note : My date column data type is timestamp in database not datetime.
0
Accepted
Princy
Top achievements
Rank 1
answered on 12 Mar 2014, 09:15 AM
Hi Rahul,

As per my knowledge this is not possible to achieve since the SQL timestamp is not actually a datetime data type. TimeStamp is a binary sequence. There is no correlation to a DateTime.

Thanks,
Princy
Tags
Grid
Asked by
Rahul
Top achievements
Rank 1
Answers by
Rahul
Top achievements
Rank 1
Princy
Top achievements
Rank 1
Share this question
or