08-11-07 12:18 AM
On Fri, 10 Aug 2007 07:10:06 -0700, Gurvinder
<Gurvinder@discussions.microsoft.com> wrote:
>I have cost value and it comes as 12345 and i want to make it 123.45 and i
>am able to do that. But if value come like 12 or only 1 then i have to pad
>zero before it if i want to insert .(dot) before last 2 numbers for ex
>if I get 1 and i want it to look .01 how can i do that in map. may be
>cheking lenght of in comming string/number and padding zero before it I don
t
>know how to pad '0'
Have a custom scripting functoid that is a C# script, and have this
code:
public void pad(string param)
{
string str = param.PadLeft(5, '0');
str = str.Insert(3, ".");
MessageBox.Show(str);
}
Maybe it needs more code... do you want 000.01 or just .01 ?
--
eliasen, representing himself and not the company he works for.
Private blog: http://blog.eliasen.dk
Private email: jan@eliasen.dk
[ Post a follow-up to this message ]
|