I have a problem with the date format while hosting a site that was developed using C # .net MVC.
In my development machine ( OS: Windows 7, .net Framework 4.5 ), the date format for the spanish panama (es-PA) is mm / dd / yy and on the server machine ( OS: Windows 8, .net Framework 4.5 ) it provides the format d / m / yy for the same culture.
I tested it with a 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(); }
Exit on the development machine: 08/10/2015
Output on the server machine: 8/10/15
I also checked by changing the Language and Regional, but in both formats the machines are different by default.
Why is the format different on different machines for the same culture? Is there any solution for this?
MD's
source share