P
Phil Johnson
I am setting the current culture on the current thread in my global.asax.cs
application_start() event as follows:
System.Threading.Thread.CurrentThread.CurrentCulture = new
System.Globalization.CultureInfo("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.ToUniversalTime().ToLongDateString();
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
www.pjsoftwaredevelopment.com
application_start() event as follows:
System.Threading.Thread.CurrentThread.CurrentCulture = new
System.Globalization.CultureInfo("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.ToUniversalTime().ToLongDateString();
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
www.pjsoftwaredevelopment.com