Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
function FormatCurr(const Format: string; Value: Currency): string; overload;
function FormatCurr(const Format: string; Value: Currency; const FormatSettings: TFormatSettings): string; overload;
Returns a string from a currency point value using the provided format string.
The second form of FloatToStr, refers to localization information contained in the FormatSettings parameter.
var Salary : Currency;
Salary := 2.3132 * 12; // == 27,758.4
//sub example 1
ShowMessage(FormatCurr('###', Salary)); // == '27758'
ShowMessage(FormatCurr('00000000', Salary)); // == '00027758'
ShowMessage(FormatCurr('#,##00', Salary)); // == '27758.4000'
//sub example 2
ShowMessage(FormatCurr('"Salary = "#,#.0, Salary)); // == 'Salary = 27.758,4'
|
CurrToStr,
|
Free Delphi code snippet inside every Delphi Newsletter! |
|
|
|
Got some code to share? Got a question? Need some help? |
|
|