02-02-2017 5:11 PM - edited 01-21-2024 9:35 PM
Hi All,
I've an issue in formatting a decimal type field with thousands & comma separator using 'to_char' in SAP Infosteward 4.2.
Here is the scenario:
Input: 12345.67
Desired output: 12,345.67
I've used the conversion as "to_char("12345.67", '9G999D.99') but I get the result as '345.67' instead of '12,345.67'.
Any help in resolving the issue is much appreciated.
Thanks,
Mani R
Hi Mani,
Your screenshot shows you are converting a decimal to a varchar but you are putting the results back into a decimal column. Try changing this so the result of the to_char() function is output to a varchar column. Thanks.
Doug
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mani,
Try the following:
to_char(12345.67, '99G,999D.99')
This works correctly for me and returns '12,345.67'
Regards,
Doug
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.