Date Format String Not working

2 posts, 0 answers
  1. Rodney
    Rodney avatar
    54 posts
    Member since:
    Mar 2015

    Posted 21 Feb 2017 Link to this post

    I've looked at a number of threads on this but none have fixed my problem. The DateFormatString="{0:dd MMM yyyy}" is not being applied. This is a date field in the database and it is currently being displayed as mm/dd/yyyy hh:mm:ss

    Here's the column definition:

     

    <telerik:GridDateTimeColumn UniqueName="RECORDSTARTDATE" HeaderText="Record Start Date" DataField="RECORDSTARTDATE" ShowFilterIcon="false"
                             DataFormatString="{0:dd MMM yyyy}" DataType="System.DateTime" HtmlEncode="false" ItemStyle-CssClass="center"
                             CurrentFilterFunction="GreaterThanOrEqualTo" HeaderStyle-Width="120px" />
  2. Eyup
    Admin
    Eyup avatar
    4030 posts

    Posted 24 Feb 2017 Link to this post

    Hi Rodney,

    I've tried the mentioned DataFormatString and it works as expected on my side and displays:
    24 Feb 2017

    Please make sure that the values kept in the database are of type DateTime. You can run the attached web site sample, apply the property and verify the result.

    Regards,
    Eyup
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top