vb.net - How to split textbox value then display splitted value on label -
how split text box (delimited "-") value display split values on 2 labels?
heres code:
dim s string dim substring string dim sp() string s = txttime1.text 'this text box contains value (08:00-17:41) sp = s.split("-") each substring in sp txttimein.text = substring txttimeout.text = substring next
my problem txttimein , txttimeout displays value '17:41'. thank in advance.
try this:
dim s string dim substring string dim sp() string s = txttime1.text 'this text box contains value (08:00-17:41) sp = s.split("-") txttimein.text = sp(0) txttimeout.text = sp(1)
Comments
Post a Comment