Hello,
I am having a problem with the display of zero as 0, yet I want it to display as 0.00. I have tried the results of other postings, with no success. I have switched datatypes, suppressed zeroes, converted to a double or float, if-then-else, etc. - but it is still not working.
In the transformer stage:
Input: Decimal 38,2
Stage Variable: Decimal 38,2 used to calculate an amount
Output: Varchar 40 with a
DecimalToString(STAGE_VARIABLE_NAME_HERE,"suppress_zero") conversion.
I still get 0 where I need 0.00
Any ideas?
Thanks,
Barbara
zero output as 0.00
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 7
- Joined: Mon Dec 17, 2007 1:37 am
- Location: Boston, MA
Hello Barbara,
Are you trying to display in the target as '0.00' (varchar datatype)?
If yes did you try this:
Let us know your results.
Are you trying to display in the target as '0.00' (varchar datatype)?
If yes did you try this:
Code: Select all
Field(DecimalToString(STAGE_VARIABLE_NAME_HERE, 'fix_zero, suppress_zero'), '.', 1)
: '.' : Left(Field(DecimalToString(STAGE_VARIABLE_NAME_HERE, 'fix_zero'), '.', 2) : Str('0', 2) , 2)
Thanks and Regards!!
dspxlearn
dspxlearn
Hello Barbara,
Are you trying to display in the target as '0.00' (varchar datatype)?
If yes did you try this:
Let us know your results.
Are you trying to display in the target as '0.00' (varchar datatype)?
If yes did you try this:
Code: Select all
Field(DecimalToString(STAGE_VARIABLE_NAME_HERE, 'fix_zero, suppress_zero'), '.', 1)
: '.' : Left(Field(DecimalToString(STAGE_VARIABLE_NAME_HERE, 'fix_zero'), '.', 2) : Str('0', 2) , 2)
Thanks and Regards!!
dspxlearn
dspxlearn
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 7
- Joined: Mon Dec 17, 2007 1:37 am
- Location: Boston, MA