-
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.
-
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
-
Re: Replace function
Code:
Dim Parts() As String = "1.02.30".Split(".".ToCharArray)
Console.WriteLine( _
String.Concat( _
Parts(0), _
":", _
Parts(1), _
",", _
Parts(2) _
) _
)
-
Re: Replace function
Quote:
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.