Hi,
I need to format the decimal values coming from a source in this format
NNN.NNNNNNNN, i.e if the input is 6.56 the output should be
006.56000000,
I have tried using the fmt function but i'm not able to get the required output
Can someone help me with this
Formatting decimal value
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
Fmt(Field(InLink.TheNumber,".",1,1), "R%3") : "." : Fmt(Field(InLink.TheNumber, ".", 2, 1), "L%8")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In server jobs you're wrong. DataStage server jobs always return the smallest possible string from any arithmetic operation - this means trimming leading and trailing non-significant zeroes, whether you want that or not.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.