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

date format :dd/mm/yyyy

Thread ID:

Created:

Updated:

Platform:

Replies:

118496 Mar 13,2015 06:31 AM UTC Mar 16,2015 11:22 AM UTC ASP.NET MVC 1
loading
Tags: Grid
Ganga
Asked On March 13, 2015 06:31 AM UTC

how to getting data from controller(12/2/2015) to view without changing .

Prasanna Kumar Viswanathan [Syncfusion]
Replied On March 16, 2015 11:22 AM UTC

Hi Ganga,

Thanks for using Syncfusion Products.

We analyze your requirement and we suggest you to use format property in the particular date column. Please find the below code snippet

.Columns(col =>

{

col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).TextAlign(TextAlign.Right).Width(75).Add();

col.Field("CustomerID").HeaderText("Customer ID").Width(80).Add();

col.Field("EmployeeID").HeaderText("Employee ID").TextAlign(TextAlign.Right).Width(75).Add();

col.Field("Freight").HeaderText("Freight").TextAlign(TextAlign.Right).Width(75).Format("{0:C}").Add();

col.Field("OrderDate").HeaderText("Order Date").TextAlign(TextAlign.Right).Width(80).Format("{0:dd/MM/yyyy}").Add();

}))

For different types of formats, Please refer below online sample link :

Link : http://mvc.syncfusion.com/demos/web/grid/columnformatting

For your convenience we have created a sample and sample can be downloaded from the below link

Sample Link : http://www.syncfusion.com/downloads/support/forum/118496/Sample118496-1456752423.zip

We have used the jquery globalize to perform those formatting and we can use all the format strings supported by jquery globalize wrapped between “{0” and “}” . And also please check the below link for standard Date and time format strings available.

Link : https://msdn.microsoft.com/en-us/library/az4se3k1%28v=vs.110%29.aspx

Please get back to us if you have any further assistance,

With Regards,

Prasanna Kumar N.S.V


CONFIRMATION

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.

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

;