How to use Delphi's AsCurrency to show currency without currency symbol?

Posted by croceldon on Stack Overflow See other posts from Stack Overflow or by croceldon
Published on 2010-03-30T18:49:52Z Indexed on 2010/03/30 18:53 UTC
Read the original article Hit count: 317

Filed under:

I'm trying to display a currency value in a grid, but I do not want the currency symbol to be shown:

if fPreferences.WorksheetFormat = 'Numeric' then
begin
  CurrencyString := '';
  Value := FieldByName('UnitList').AsCurrency;
end else
  Value := CurrToStrF(FieldByName('UnitList').AsCurrency, ffCurrency, 2, langFormat);

The problem is that it's still showing the currency symbol. What am I doing wrong here? I don't think I can use CurrToStrF, because I need the grid to export a number to excel, not a string.

© Stack Overflow or respective owner

Related posts about delphi