By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,934 Members | 1,677 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,934 IT Pros & Developers. It's quick & easy.

Setting decimal symbol

P: n/a
Hi everybody!

I have question about setting decimal symbols... In some countries,
for example in my country we use comma for decimal symbol, but
in in some other countries it is decimal point. The problem is when
I use comma and want to save data in database.
For example if i want to save number 4,50 it saves like 450, but
if i write 4.50 it regulary saves the number in that format.
My question is how to make to program knows what to act if my app
is working on system where decimal symbol is comma or decimal point.
Or should i use only comma and when saving data i just parse the
number and replace comma with point?
Feb 21 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Joza wrote:
I have question about setting decimal symbols... In some countries,
for example in my country we use comma for decimal symbol, but
in in some other countries it is decimal point. The problem is when
I use comma and want to save data in database.
For example if i want to save number 4,50 it saves like 450, but
if i write 4.50 it regulary saves the number in that format.
My question is how to make to program knows what to act if my app
is working on system where decimal symbol is comma or decimal point.
Or should i use only comma and when saving data i just parse the
number and replace comma with point?
You can either explicit specify CultureInfo for the
Parse or if you have really special requirements
explicit specify a NumberFormatInfo.

Arne
Feb 21 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.