As far as I know there is no way with numerical formating to set  
whether numbers between 0 and 1 are padded with a zero. Unfortunately,  
the <@trim> is not as functional as <@pad>, or you could use this.  
There would be several ways to rid the first zero for display purposes,  
but this seems to be the easiest:
assume @@local$number is the 0.50 number read from a datasource, and  
@@local$displayNumber is the output.
<@! for safety, you should verify it is a number between 0 and 1>
<@if "(@@local$number < 1) and (@@local$number > 0)">
        <@assign local$displayNumber
                "<@substring str='<@var local$number format="num:3-*,\,,2,.,,,-,">'  
start='2' numchars='<@length str="<@var local$number  
format='num:3-*,\,,2,.,,,-,'>">'>">
<@else>
        <@assign local$displayNumber "<@var local$number  
format='num:3-*,\,,2,.,,,-,'>">
</@if>

You could make this a custom tag if you use it a lot.

Robert

On Sunday, September 1, 2002, at 04:50  PM, Thomas Ferguson wrote:

> ok, I give up...  whoever designed the format scheme in Tango (not  
> Witango,
> because it was there before) was a sadist.
>
> What is the proper format attribute to use when all I want fifty cents  
> to
> display like this: .50  instead of 0.50 or $ 0.50?
>
> format="num:us-accounting" gives this: $ 0.50
> format="num:3-*,\,,2,.,,,-,"  gives this: 0.50
>
> How do I lose the leading 0?
>
> TIA
>
> Tom Ferguson
>
>
> _______________________________________________________________________ 
> _
> TO UNSUBSCRIBE: send a plain text/US ASCII email to  
> [EMAIL PROTECTED]
>                 with unsubscribe witango-talk in the message body
>

-- 

Robert Garcia
BigHead Technology
2781 N Carlmont Pl
Simi Valley, CA 93065
Phone 805.522.8577
http://www.bighead.net/
http://www.theradmac.com/
[EMAIL PROTECTED]

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to