Dates doesn't show up right in when downloaded to excel

5 posts, 1 answers
  1. Tess
    Tess avatar
    6 posts
    Member since:
    Sep 2017

    Posted 08 Nov 2017 Link to this post

    Hi,

     

    I've radGrid in which I display couple of date columns. I format the date using DataFormatString property. It displays good in grid as I want. But when downloaded to excel the values don't make any sense to me. 

    <CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false" />
     
    <telerik:GridBoundColumn DataField="LiquidationDate" UniqueName="LiquidationDate" HeaderText="Liquidation Date" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />

     

    Attached images to show how they are displayed in grid vs excel. Please help. 

  2. Tess
    Tess avatar
    6 posts
    Member since:
    Sep 2017

    Posted 08 Nov 2017 in reply to Tess Link to this post

    Here is the Grid image. I've attached both Excel images in my post..
  3. Answer
    Attila Antal
    Admin
    Attila Antal avatar
    388 posts

    Posted 13 Nov 2017 Link to this post

    Hi Tess,

    Try using the following format "{0:MM/dd/yyyy}" and see if that works for you.

    <telerik:GridBoundColumn DataField="LiquidationDate" UniqueName="LiquidationDate" HeaderText="Liquidation Date" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:MM/dd/yyyy}" />

    You can test the basic sample I've attached.

    Kind Regards,
    Attila Antal
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. Tess
    Tess avatar
    6 posts
    Member since:
    Sep 2017

    Posted 13 Nov 2017 in reply to Attila Antal Link to this post

    Thank you Attila Antal. It worked.
  5. Attila Antal
    Admin
    Attila Antal avatar
    388 posts

    Posted 13 Nov 2017 Link to this post

    Hi Tess,

    I am glad the solution helped.

    Good luck with your project!

    Kind Regards,
    Attila Antal
    Progress Telerik
    Try our brand new, jQuery-free Angular 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