I have problem with date formate while hosting site which is developed using C# .net MVC .
In my development machine(OS:Windows 7, .net Framework 4.5) date formate for Spanish-Panama(es-PA) is mm/dd/yy and in server machine(OS:Windows 8, .net Framework 4.5) it is giving d/m/yy format for same culture.
I checked it with by using simple console application.
public static void Main()
{
DateTime dt = DateTime.Now;
Thread.CurrentThread.CurrentCulture = new CultureInfo("es-PA");
Console.WriteLine(dt.ToString("d"));
Console.ReadLine();
}
Output on development machine is: 10/08/2015
Output on server machine is : 8/10/15
I also checked by changing Language and Regional but in both machine default format is different.
Why format is different in different machine for same culture? Is there any solution for this?