Skip to Content
author's profile photo Former Member
Former Member

FormatNum function

Hi

when we will use FormatNum node function ?? what is its use ??

Thanks

kumar

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2007 at 04:48 AM

    Hello palnati,

    Calculations (Add,Multiply,etc..) are performed with Java Float Precision

    Trailing Zeros in result are truncated Eg : 5.6-0.6 = 5

    To keep the Trailing Zeros use the FormatNum Function.

    And if you want the do the Padding we use these Function.

    Regards

    Prasad

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 11, 2007 at 02:38 AM

    if you have input like 1,2,3 4 and you want output like 0001,0002,0003 etc then you use format number.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2007 at 04:51 AM

    Hi palnati,

    FormatNum Converts a Integer according to a pattern that you define using the function properties.

    Examples

    input a = 123 then you need 000123.

    a -- formatnum(give the format 000000) --b

    for example if you want commas after 3 numbers

    you just use input -> number format->output

    Ex: 1234 ->000,0->123,4

    see here to get more examples

    http://java.sun.com/j2se/1.3/docs/api/java/text/DecimalFormat.html

    check these threads

    example-of-formatnum-usage

    https://forums.sdn.sap.com/click.jspa?searchID=5851686&messageID=3138012

    convert-quantity-field

    formatnum-with-strings

    Regards

    BILL

    <b>**reward with points if it helps u!!!</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2007 at 05:46 AM

    Hi

    Incase if u what to get the output in particular format

    then we will go for this formatnumber.

    e.g:

    2 -> 00002

    23 ->00023

    You can mention the pattern type in the properties.

    Regards

    Yuga

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 05:12 AM

    Hi Palnati,

    formatNum is not a node function..it's an Arithmetic function.

    Regards,

    Ramana Kumar. A

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.