Reputation: 1993
I want to convert the datetime format according to the culture through javaScript/jQuery.
Ex: Let we have a date:
var starDate = "7/4/2013 9:00:00 AM"
then after conversion this into french it should be "4 juillet 2013 09:00"
like we have in c#:
DateTime dteStartTime = "7/4/2013 9:00:00 AM";
dteStartTime.ToString("f", CultureInfo.CreateSpecificCulture("fr-CA"));
it will convert this datetime into "4 juillet 2013 09:00"
Upvotes: 0
Views: 2513
Reputation: 87
You can do this by using the globalize.js. Just make sure you pass a correct culture code. Maybe it will better idea just to pass the converted date from C# as string?
Upvotes: 0