• Index
  •  » Usage, Operation
  •  » [resolved] how convert string "1234567" to "12345.67" using expresstion builder

Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

umeshrakhe
2012-01-11 13:41:21

Hi Janhess thank you for sharing easy way of convert into decimal.

janhess
2012-01-03 10:11:54

If your output field is decimal with 2 places why not just divide by 100?

Nikhil
2011-12-30 11:02:04

Hey Umesh Thank you!! Now its working!!Thank you for your suggestion!!!

umeshrakhe
2011-12-29 07:09:23

Hi Nikhil,
yes i agree that some time it is not working,i don`t know but you can wright routines to done this task. create a one routine and wright down below code. and let me know if it is working for you or not.
// pass your column name to this function.
public  static String ChangeToDecimal(String message) {
             {
                
            if(message.length()>2)
            {
         temp=message.substring(0,message.length()-2) +"."+message.substring(message.length()-2);

                   
            }
            else
            {
             temp="0.00";   
            }
            }
            return temp;
}

Nikhil
2011-12-27 10:40:45

Hi new BigDecimal(Numeric.convertImpliedDecimalFormat("9V99","123456")); is not working in my case.Is there any other alternative available to do the same?

pedro
2011-12-27 02:36:19

Hi

Glad that you find the answer.
Seasons Greeting!

Best regards!
Pedro

umeshrakhe
2011-12-26 13:48:19

new BigDecimal(Numeric.convertImpliedDecimalFormat("9V99","123456"));

this works for me

umeshrakhe
2011-12-26 11:17:22

Hi all
i am getting input in string format which is plane integer and want to convert it to decimal format. as the subject line eg. shows if my input string is "1234567" then want to out put it in 12345.67. please suggest.

Board footer

Powered by FluxBB