Click here to Skip to main content
15,889,507 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi experts,

C#
function show()
{
   var cultureInfo = "<%= CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern.ToString() %>";
   alert(cultureInfo);
}


using above javascript am getting client systems date in ie11 but its not working properly
in ie9 and ie10 can any one please help me to solve this issue?

thanking you
(keerthi Kumar)
Posted
Updated 13-Oct-14 23:34pm
v4
Comments
Ankur\m/ 25-Apr-14 2:49am    
What do you mean by "not working properly"? Give more details.
Keerthi Kumar(Andar) 25-Apr-14 2:54am    
hi Ankur\m/,
means. after hosting in iis if i run that script in ie 11 it will give exact clients systems date in the same format..but if i run that in ie9 or ie10 even though client systems date in dd/mm/yyyy format it will give by default mm/dd/yyyy format
Sinisa Hajnal 14-Oct-14 4:29am    
Try using CurrentUICulture. Might help.
k_gurpreet 14-Oct-14 2:52am    
have you got the solution? i am facing the similar problem

1 solution

GOT THE SOLUTION :)

by adding following line to the top of your
HTML
<head></head>


HTML
<meta http-equiv="X-UA-Compatible" content="IE=Edge"></meta>


This will force IE to use its most up-to-date rendering engine
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900