I am setting the current culture on the current thread in my global.asax.cs
application_sta rt() event as follows:
System.Threadin g.Thread.Curren tThread.Current Culture = new
System.Globaliz ation.CultureIn fo("en-GB");
In my default.aspx.cs I then set the text of a label from a datetime
variable like this:
lblDate.Text = DateTime.Now.To UniversalTime() .ToLongDateStri ng();
But the date is formatted in United States format.
I am hosting on a US host, so I would expect the format to be US without
setting the CurrentCulture, but I am clearly setting that to UK formatting so
I thought the date should be formatted as such.
Do I need to do something differently?
--
Regards,
Phillip Johnson (MCSD For .NET)
PJ Software Development
application_sta rt() event as follows:
System.Threadin g.Thread.Curren tThread.Current Culture = new
System.Globaliz ation.CultureIn fo("en-GB");
In my default.aspx.cs I then set the text of a label from a datetime
variable like this:
lblDate.Text = DateTime.Now.To UniversalTime() .ToLongDateStri ng();
But the date is formatted in United States format.
I am hosting on a US host, so I would expect the format to be US without
setting the CurrentCulture, but I am clearly setting that to UK formatting so
I thought the date should be formatted as such.
Do I need to do something differently?
--
Regards,
Phillip Johnson (MCSD For .NET)
PJ Software Development
Comment