|
-
Jun 12th, 2011, 10:27 AM
#1
Thread Starter
New Member
Replace function
Hello guys,
I am using a software that graps informations from web-sites. But i want to something on those information. For doing that, it allows me make a VB script. Actually i have never studied any Vb code. But i found a solution for my project.
The data from that website is for exmp. "1.02.30" i want to change first dot into semi colon and the second dot into comma, namely "1:20,30". I found replace function and it works if i want to do "1:20:30" that. But i have to change first dot into semi colon and the second dot into comma. Any ideas ?
Thanks.
-
Jun 12th, 2011, 10:58 AM
#2
New Member
Re: Replace function
why not do a replace on the first set of characters only.
maybe
Code:
REPLACE(LEFT([your string],3,".",";)
then follow that by a
Code:
REPLACE([Your New String],".",":")
Scott
-
Jun 12th, 2011, 11:22 AM
#3
Re: Replace function
Code:
Dim Parts() As String = "1.02.30".Split(".".ToCharArray)
Console.WriteLine( _
String.Concat( _
Parts(0), _
":", _
Parts(1), _
",", _
Parts(2) _
) _
)
-
Jun 12th, 2011, 12:05 PM
#4
Thread Starter
New Member
Re: Replace function
 Originally Posted by kevininstructor
Code:
Dim Parts() As String = "1.02.30".Split(".".ToCharArray)
Console.WriteLine( _
String.Concat( _
Parts(0), _
":", _
Parts(1), _
",", _
Parts(2) _
) _
)
Thank you. It gave an idea.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|