Question Display Zero @ Decimal Datatype

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.
 

Osborne

Active Member
You either need to adjust the format and/or decimals settings of the decimal datatype:
Code:
DEFINE VARIABLE vValue AS DECIMAL FORMAT ">>9.999999" DECIMALS 6 LABEL "Decimal Value" NO-UNDO.

vValue = 7.072210.
DISPLAY vValue.
 

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.
 
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.
what is your code?
 
Top