CultureInfo cultureInfo = CultureInfo.CreateSpecificCulture(HttpContext.Current.Request.UserLanguages[0]); DateTimeFormatInfo dtInfo = cultureInfo.DateTimeFormat;After debugging the code, the dateformat is not honouring globalization ie.. if the client is in US but application is deployed in UK then the format is rendered correctly. So after looking into this article Globalization, Internationalization and Localization in ASP.NET MVC 3, JavaScript and jQuery Part 1 - by Scott HanselmanI have found that the issue is not with the code but a setting in web.config
globalization enableclientbasedculture="true" uiculture="auto" culture="auto"Now this has solved the issue.
I am sorry to say that there is too much point to the wisecrack that life is extinct on other planets because their scientists were more advanced than ours. ~John F. Kennedy
Great Article
ReplyDeleteASP.NET MVC Training
Online MVC Training
Online MVC Training India
Dot Net Training in Chennai
.Net Online Training
.net training online
Dot Net Online Training