We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Format Column

I noticed that if I wanted a  DateTime column  (as an example) Wed 01-Jan-2020 20:15 usually I would expect to write:
        <GridColumn
                Field=@nameof(Job.bookingTime) HeaderText="BT" Format="ddd dd-MMM HH:mm"
                Type="ColumnType.Date" TextAlign="TextAlign.Left" Width="30">
          </GridColumn>
However, the column is displayed 01 01-Jan-2020 20:15, The "ddd" does not appear to be working.

2 Replies

VN Vignesh Natarajan Syncfusion Team December 3, 2019 09:28 AM UTC

Hi Paul, 

Greetings from Syncfusion support.  

Query: “However, the column is displayed 01 01-Jan-2020 20:15, The "ddd" does not appear to be working. 

We are able to reproduce the reported issue at our end while preparing a sample as per your code example and we have confirmed it is bug. Thank you for taking the time to report this issue “Some C# date formats are not applied properly to Grid” and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming release (2019 Volume 4 -Beta) which is expected to be rolled out in the mid of December 2019 . 
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this feedback. 
 
   
Till then, we suggest you to achieve your requirement using Column Template feature of EjsGrid. Refer the below code example. 

<EjsGrid ID="Grid" ModelType="@Model" DataSource="@GridData" AllowPaging="true"> 
    <GridColumns> 
         . . . . . . . . . 
        <GridColumn Field=@nameof(OrdersDetails.OrderDate) HeaderText="Order Date" Type="ColumnType.Date" Width="160"> 
            <Template> 
                @{ 
                    var employee = (context as OrdersDetails); 
                   <span>@employee.OrderDate.ToString("ddd, dd-MMM HH:mm")</span>               } 
            </Template> 
        </GridColumn> 
        <GridColumn Field=@nameof(OrdersDetails.HireDate) HeaderText="Hire Date" Type="ColumnType.Date" Width="160"> 
            <Template> 
                @{ 
                    var employee = (context as OrdersDetails); 
                    <span>@employee.OrderDate.ToString("ddd, dd-MMM HH:mm")</span> 
                } 
            </Template> 
        </GridColumn> 
        <GridColumn Field=@nameof(OrdersDetails.ShipCountry) HeaderText="Ship Country" Width="150"></GridColumn> 
    </GridColumns> 
</EjsGrid> 

Refer our UG documentation for your reference 


Please get back to us if you have further queries. 

Regards, 
Vignesh Natarajan. 



VN Vignesh Natarajan Syncfusion Team December 20, 2019 10:22 AM UTC

Hi Paul,   
  
We are glad to inform that our latest Nuget package (17.4.0.39) has been successfully rolled out. In this release, we have some major changes in our components to improve its performance and also we have migrated our Components to .Net Core 3.1. Hence there are some breaking changed in our components.  
  
Please find the latest Nuget package from below and also find the release notes regarding the fixes we have included in this release.   
  
  
  
  
Also ensure that you have referred the latest version script and css as below   
  
   <link rel='nofollow' href="https://cdn.syncfusion.com/ej2/17.4.39/material.css" rel="stylesheet" />  
  
  
NOTE: In this release we have included the fix for the issue “Some C# date formats are not applied properly to Grid”. 
  
Refer our UG documentation for upgrading the application to our latest version  
  
  
Please get back to us if you have further queries.  
  
Regards,  
Vignesh Natarajan.  


Loader.
Live Chat Icon For mobile
Up arrow icon