tags:

views:

83

answers:

2

I am working on converting an app for a UK customer to deploy on their server. I am trying to figure out the best way to make as few changes as possible to the app but still have the DateTime and currency values convert to UK format?

Any ideas? I am looking for something quick and light?

+4  A: 

I would replace all the date references with DateTime.ParseExact and Currency references with moneyDouble.ToString("c").

//I would use ParseExact over Parse when dealing with global date conversions
DateTime dt = DateTime.ParseExact(date, format, CultureInfo.InvariantCulture);

Double money = 100.00;
money.ToString("c");

There is obviously more elegant solutions but if you are looking for something quick and low impact.....

Extra Reading about System.Globalization should give you some extra info if needed.

cgreeno
You can't go wrong with that
Sung Meister
+1  A: 

Make sure you have the application set up with the proper culture. Add to that the suggestions BTHB suggested and you are pretty much on track here.

If you want to research, MSDN has some good articles on globalization/localization. Focus more on the localization part.

Gregory A Beamer