British date instead of american

G

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
 
R

Rad [Visual C# MVP]

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");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top