Home All Groups Group Topic Archive Search About

British date instead of american

Author
7 Dec 2006 3:16 PM
Gina
I normally use this line:  Session.LCID = (2057)
in my code so that all date fields are british and not american in format.

How might I do this when using a console application? It doesn't 'Session'.

Thanks!

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Author
7 Dec 2006 5:40 PM
Rad [Visual C# MVP]
On Thu, 07 Dec 2006 07:16:39 -0800, Gina wrote:

> I normally use this line:  Session.LCID = (2057)
> in my code so that all date fields are british and not american in format.
>
> How might I do this when using a console application? It doesn't 'Session'.
>
> Thanks!
>
> EggHeadCafe.com - .NET Developer Portal of Choice
> http://www.eggheadcafe.com

Try this:

Thread.CurrentThread.CurrentCulture = new CultureInfo("en-gb");


AddThis Social Bookmark Button