S susu Well-Known Member Licensed User Longtime User Feb 15, 2011 #1 I have this code: B4X: Dim now As Long Dim str As String now = DateTime.Now str = now str.SubString2(0,5) Msgbox(str, now) Compiled without error but message box display the same number. Ps: All I want is getting just 5 first numbers of milliseconds value.
I have this code: B4X: Dim now As Long Dim str As String now = DateTime.Now str = now str.SubString2(0,5) Msgbox(str, now) Compiled without error but message box display the same number. Ps: All I want is getting just 5 first numbers of milliseconds value.
specci48 Well-Known Member Licensed User Longtime User Feb 15, 2011 #2 Hello susu, B4X: str.SubString2(0,5) returns a string but you did not assign it to any value, so str remains unchanged. If SubString should also change the value of str you have to B4X: str = str.SubString2(0,5) specci48 Upvote 0
Hello susu, B4X: str.SubString2(0,5) returns a string but you did not assign it to any value, so str remains unchanged. If SubString should also change the value of str you have to B4X: str = str.SubString2(0,5) specci48
S susu Well-Known Member Licensed User Longtime User Feb 15, 2011 #3 I got it. Thank you Specci48. I'll remember not to copy exactly "IDE help" Attachments idehelp.jpg 25.2 KB · Views: 276 Upvote 0