Inserting into middle of a string (easy)

# Thread: Inserting into middle of a string (easy)

1. Member
Join Date
Dec 1969
Posts
80

## Inserting into middle of a string (easy)

I need to be able to insert a decimal point into the middle of a string.<BR><BR>For instance, if a user inputs 12345, I need to instead calculate it as 1.2345 with the decimal point four spaces in from the right.<BR><BR>How do I put that decimal point in there?<BR><BR>:)

2. Senior Member
Join Date
Dec 1969
Posts
1,846

## RE: Inserting into middle of a string (easy)

Well you could use Left and Right String functions or simply mutiply by .0001 IE:<BR><BR>&#039; Calculate Decimal number<BR>X = CLng("12345") * .0001<BR><BR>&#039; Manipulate String<BR>X = Left("12345",1) & "." & Right("12345",4)<BR><BR><BR>

3. Senior Member
Join Date
Dec 1969
Posts
96,118

## Ummm...why a string?

Response.Write ( 12345 / 10000 )<BR><BR>Or<BR><BR>Response.Write ( number / 10000 )<BR><BR>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•