FormatNumber as currency - but need a decimal

If you have a new question you’d like our support staff to post a response to, please visit our customer community, Data Security Insiders, to pose the question in our Discussion Boards. We have a thread “Ask Our Tech Experts” that our support team monitors on a regular basis, or you can start a new discussion where other GoAnywhere users and support staff can weigh in. Log in or create your new account at

If you need an immediate response, please create a support ticket or contact our support team by email at [email protected].
2 posts Page 1 of 1


Posts: 1
Joined: Mon Dec 14, 2015 12:27 pm

Post by RyanHulslander » Tue Dec 29, 2015 12:56 pm
Question - is there an easy way to use "FormatNumber" and take a fixed length field such as 00053084 and convert it to $530.84 ?

What I'm trying to do is take a number that is in a fixed-length record and display it with the decimal before the rightmost two digits. Everything I see in the FormatNumber pattern shows me how to add in a ".00" if it's not there, or perform rounding if the number already contains a decimal. In this case there is no decimal but the #.## pattern is implied with the rightmost two digits.

Is there a way to invoke FormatNumber on this or do I need to come up with a slightly more elaborate function to take the number convert it to a string and chop it up for display accordingly?




Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Tue Dec 29, 2015 1:19 pm

The easiest way to do this is to just format the number as needed using the "/100" method. Since the value is implied as 2 decimals, this can be done like this:

Using MyNumber = 00053084

<setVariable label="setVar: FormattedNumber" name="FormattedNumber" value="${FormatNumber(MyNumber/100, &apos;$####.##&apos;)}" version="2.0" />

The output log will show this:

Variable 'FormattedNumber' was created and set to '$530.84'.
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
2 posts Page 1 of 1