I have a field in a gridvie that displays the date in the following format
1/2/2012 3:45:13 AM
How can I format it so that it does ot show the seconds?
Thank you
<telerik:GridBoundColumn
DataField="AdmissionDate"
HeaderText="Date"
SortExpression="AdmissionDate"
HtmlEncode="False" />
Try this(short date and short time):
DataFormatString="{0:g}"
Although this is for BoundFields in an ASP.NET GridView, i assume(i have no experiences with Telerik controls) that it works also on a Telerik GridBoundColumn, because it also has this property.
Something like this:
<Columns>
<telerik:GridBoundColumn
DataField="AdmissionDate"
DataType="System.DateTime"
HeaderText="AdmissionDate"
SortExpression="OrderDate"
DataFormatString="{0:MM/dd/yy hh:mm}"
UniqueName="AdmissionDate">
</telerik:GridBoundColumn>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With