date - Time Formatting? VB.Net -


i have been trying find how make happen if write time format textbox without being current time.

so instead of this: if textbox1.text = format(now, "hh:mm") , textbox2.text = format(now, "mm/dd/yyyy") or textbox1.text = format(now, "h:mm") , textbox2.text = format(now, "mm/dd/yyyy") then want detect there time format , date format , can time , date, matters has time , date format.

thanks help, thevb10guy

use datetime.tryparse():

    dim dt datetime     if datetime.tryparse(textbox1.text, dt)         debug.print("pass")     else         debug.print("fail")     end if 

Comments

Popular posts from this blog

javascript - Wordpress slider, not displayed 100% width -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -