Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
VB.NET
VB.NET General Discussion
Verify a String uses Proper Time Format
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="jmcilhinney, post: 167936, member: 641"] There's no such time as 13:00:00 PM. There is 1:00:00 PM and there is 13:00:00. Either you use 12-hour time with an AM or PM or you use 24-hour time. You don't use a bastardised combination of the two. I have to most strongly recommend that you don't use InputBox at all... ever, but especially here. If you did what you should and created your own dialogue form then you could put a DateTimePicker on it and there would be no need to validate at all. The control would do it for you. If you really want to validate a String for a specific date and/or time format then you should use the Date.TryParseExact method. That would be a poor option in this case though, given that you shouldn't have a String in the first place. [/QUOTE]
Insert quotes…
Verification
Post reply
VB.NET
VB.NET General Discussion
Verify a String uses Proper Time Format
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom