decimal format with decimal places 4... how?

julkifli33julkifli33 Member Posts: 1,087
I have decimal = 324.6380
but i want to show as 324.6400

if I have decimal = 324.64
i also want to show as 324.6400

how to set the format???

Comments

  • ta5ta5 Member Posts: 1,164
    Where do you have to show the value? Dataport, Report, etc?
    Regards
    Thomas
  • AndwianAndwian Member Posts: 627
    4:4
    Regards,
    Andwian
  • SogSog Member Posts: 1,023
    edited 2010-12-22
    sourceexpr: round(mydecimalfield/variable;0.01)
    decimalplaces: 4:4
    If you fill these in into your textbox on your report and/or form (doesn't matter where), you will have for
    345,648 -> 345,6500
    and for
    321,1 -> 321,1000
    So both your questions are solved with these 2 properties.
    Since you want to round the numbers, I assume it is for output only. If you want to edit the numbers, please don't round them.

    [edit] I stand corrected, and modified my mistakes
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • kinekine Member Posts: 12,562
    round(mydecimalfield/variable,2)

    No, this is wrong.
    round(mydecimalfield/variable,0.01)
    
    is correct, of course, only if the editbox is only for viewing (read only).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • DenSterDenSter Member Posts: 8,305
    Like I said on DUG, the numbers 324.6380 and 324.6400 are two completely different numbers. Representing the number 324.6380 as 324.6400 is mathematically incorrect, and financially it can lead to pretty severe rounding differences.
Sign In or Register to comment.