1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question Display Zero @ Decimal Datatype

Discussion in 'Development' started by Arjon M. Policar, Oct 10, 2017.

  1. Good Day Everyone! I am having trouble on how to stored and display a decimal datatype data with six decimal places but when I display the data only the 2 decimal places is displayed.
    Ex1:
    Actual Date : 125.601000 <- I wanted to display and stored it like this.
    displayed : 125.600000

    Ex1:
    Actual Date : 7.072210 <- I wanted to display and stored it like this.
    displayed : 7.070000

    Please help Masters Thank you.
     
  2.  
  3. Osborne

    Osborne Active Member

    You either need to adjust the format and/or decimals settings of the decimal datatype:
    Code (progress):
    1. DEFINE VARIABLE vValue AS DECIMAL FORMAT ">>9.999999" DECIMALS 6 LABEL "Decimal Value" NO-UNDO.
    2.  
    3. vValue = 7.072210.
    4. DISPLAY vValue.
     
  4. tamhas

    tamhas ProgressTalk.com Sponsor

    Note, the two are independent. DECIMALS determine the precision with which the number is stored. You have no control over the 0s and 1s in that storage, but it will store enough bits to give you the desired decimal precision in what is stored. You may then display that number with any precision you want, either matching the storage or rounding off or showing spurious extra zeros. All up to you.
     
  5. Marco Mendoza

    Marco Mendoza Member

    what is your code?
     

Share This Page