Hi

Hi
Can you tell me how to convert 1,000.00 to 1000.00 in Delphi ?

Example
Edit1.text = 1,000.00


i need to Show in Edit2.text = 1000.00

Comments

  1. Where does the "1,000.00" come from. Was that a float / currency from start? If this is a string, convert it to a suitable numeric type, then use localization to convert it back to a suitable string for presentation. You should have access to the "thousands" option. Set it to '' in strean of ',' or ' ' or whatever. And remember that some locales use ',' (comma) for the decimal point (ie 1 000 000,55). So simple replace can bite you har when a turk or a swede runs your software. Of course, that is all depending on your application needs and context.

    ReplyDelete

Post a Comment