Hi,
I'd like to know how to have one leading zero to all dollar values less than $1 (ie $0.32 rather than .32)
I've tried:
#oOverduebalance := #OverdueBal.AsDisplayString( EditWord ' , $00. -' )
which works for values less than $1
but obviously doesn't work for values greater than $1 as a value of 20000 displays as $200,000.00
Regards,
John
One leading zero to all dollar values less than $1
Re: One leading zero to all dollar values less than $1
I haven't tested on LANSA, but in the IBM i world if the field was 5.2 you would use
' 0 . '
Results:
DSPLY 1.22
DSPLY 0.22
DSPLY 200.22
' 0 . '
Results:
DSPLY 1.22
DSPLY 0.22
DSPLY 200.22
Art Tostaine
Re: One leading zero to all dollar values less than $1
I copied and pasted the currency floating edit mask from one of the fields already defined in the repository and this worked:
#oOverduebalance := #OverdueBal.AsDisplayString( EditWord ' , , $0 . -' )
I was using:
#oOverduebalance := #OverdueBal.AsDisplayString( EditWord ' , $0. -' )
which wasn't working.
Thanks for the help
#oOverduebalance := #OverdueBal.AsDisplayString( EditWord ' , , $0 . -' )
I was using:
#oOverduebalance := #OverdueBal.AsDisplayString( EditWord ' , $0. -' )
which wasn't working.
Thanks for the help