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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change default date format

Thread ID:





141276 Dec 3,2018 11:13 PM UTC Dec 4,2018 12:30 PM UTC ASP.NET Core 1
Tags: Grid
Asked On December 3, 2018 11:13 PM UTC

Hi, i want to know if i can change the default datetime format for every grid that i have in my application.

I want to use UTC format, without setting the format property explicitly in every date column.


Vignesh Natarajan [Syncfusion]
Replied On December 4, 2018 12:30 PM UTC

Hi Neider, 
Thanks for using Syncfusion support.  
Query: “I want to use UTC format, without setting the format property explicitly in every date column.” 
From your query, we understand that you need to display the Date object in form of UTC format without defining the Format for all the date column. 
We can achieve your requirement using two methods. Kindly refer the below  
  1.  In MVC we have given support for Data-Annotation. So the you can assign format to column using Data-Annotation by specifying the [DisplayFormat] in the model class.  
Refer the below UG documentation for your reference 
                Note: Data-Annotation will work only when Grid is rendered using Razor format. It will not work when grid is rendered using tag helper.  
  1. Based on your dataSource, we can achieve your requirement by defining the format for date column in the load event of ejGrid. By making the load event unique for all the Grid you can set format to all date Column without specifying the format for all the columns.
Note: But the above solution will work only for local data.  
So kindly share the following details, which help us to Validate the reported issue at our end. 
  1. Share the grid rendering code.
  2. Share details regarding your dataSource. Whether it is local data or remote data or you using any type of adaptor to bound data to Grid?
Requested details will be helpful for us to achieve your requirement as soon as possible. 
Vignesh Natarajan 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon