how to convert a integer input into decimal ?
-
i have a textbox for user key in the value, but i need to convert the data into two decimal place, for example, user input: 123 then i will put this input to a function to convert it into 123.00 user input: 123.456 then i will put this input to a function to convert it into 123.45 how i code this function ?
Regards, Chee ken
-
i have a textbox for user key in the value, but i need to convert the data into two decimal place, for example, user input: 123 then i will put this input to a function to convert it into 123.00 user input: 123.456 then i will put this input to a function to convert it into 123.45 how i code this function ?
Regards, Chee ken
Dim Result as Decimal = Ctype(FormatNumber(UserInput,2), Decimal)
Steve Jowett ------------------------- Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'