How can I format double to string keeping the value of the decimal point, but without showing decimal point.
Example:
Double: 21.75
Format for
String: 0002175
You can do that manually in a single line like Remy suggests:
text := StringReplace(FormatFloat('0.00', yourNumber), DecimalSeparator, '', []);
That will format the float as you need and replace decimal separator symbol with nothing - effectively omitting it.
Take note to force trailing zeroes, so that your resulting numbers are in the same order of magnitude.
FormatFloat()with(T)FormatSettings.DecimalSeparatorset to #0? - Remy LebeauDecimalSeparatordo not allow it to be #0 (one case does, but it does not apply here). You could, however, format the Double normally, then strip out theDecimalSeparatorafterwards. Not ideal, but I don't see any other option:StringReplace(FormatFloat(...), DecimalSeparator, '', [])- Remy Lebeau