-
IsTime not available in VB
IsDate determines if the date entered is a valid date, but there's not such thing for time. IsDate is available in VB but IsTime is not. why? could anyone develop this. seems so challenging though.
-
IsDate works with times, too:
Dim sTime As String
sTime = "12:19 AM"
Debug.Print IsDate(sTime)
' Prints True
sTime = "12:62 AM"
Debug.Print IsDate(sTime)
' Prints False
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
thanks for the help, but my problem is determining whether the entered time in a maskedbox is a valid time or not. the syntax is this:
If maskedbox = "__:__" Then MessageError: maskedbox.SetFocus: Exit Sub
this only traps if there is no time entered, but if the entered time is invalid, like 03:61, it won't trap and generates an error/debug.
Last edited by drchanix; 02-03-2006 at 09:23 PM.
Similar Threads
-
By steve in forum Careers
Replies: 8
Last Post: 08-08-2008, 09:46 AM
-
Replies: 44
Last Post: 06-06-2008, 04:39 AM
-
By Jeff Johnson in forum .NET
Replies: 6
Last Post: 01-18-2007, 07:44 AM
-
By Glen Kunene in forum Talk to the Editors
Replies: 17
Last Post: 03-23-2002, 12:43 AM
-
By Allison Boughton in forum VB Classic
Replies: 6
Last Post: 03-05-2001, 12:27 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks