Hello ppl.
Does anybody knows how to export decimal into TXT file (via dataport) which has 2 decimal places mandatory?
By using FORMAT command I can only make it to display (or not to display) decimals places at all but cannot force it to display 2 decimal places even if they are zero value.
for example:
in my txt file i have to have:
1234,00
1234,80
But I get (respectively):
1234
1234,8
So, how can I format decimal number to always print out with 2 decimal places?
On reports and labels (table fields on forms) there is a property for formating such fields (2:2 is exactly what I need) but through code I am not able to do it.
0
Answers
you need to put the decimal value into a textVariable, look at the codeunit 8 there is a function there FormatCellasText which will show how to do this as well but for now!
ValueAsText := FORMAT(Value,0,'<Precision,2:2><Standard Format,0>');
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
Thank you very much... Actually, just a minut ago I found a same solution (in help file too).
Anyhow, thnx!