IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Converting Decimal to String Options · View
Tony
Posted: Thursday, December 13, 2018 2:01:54 AM
Rank: Newbie

Joined: 8/3/2018
Posts: 3
Location: Singapore
I have a requirement from user, to convert a decimal field with filed length 9 and value as 184.00 to a string field with field length 9 and value as 000018400. I tried using format-number function for the conversion, but the end result shown as 000000184. The two zeros right after the decimal point have been truncated.

Any advice on a solution would be greatly appreciated.
idblew
Posted: Thursday, December 13, 2018 3:58:14 AM
Rank: Member

Joined: 6/1/2017
Posts: 10
Location: Melbourne, Australia
What you'll need to do is use format-number with a format of "0000000.00" then use string functions->replace to remove the decimal point.


idblew attached the following image(s):
ConvertDecimalToStr.jpg

Tony
Posted: Thursday, December 13, 2018 4:46:00 AM
Rank: Newbie

Joined: 8/3/2018
Posts: 3
Location: Singapore
Thank you for the solution and advise!
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.