The IsDate function will return True if it believes the argument (a String) contains a valid date (or time or date-time). Read the VB Help on this function. The function is very flexible; e.g., it recognizes "October 11, 2002 3:54 PM" as valid.)
(This is actually not as accurate as you might hope. A value of "3/29/2002" results in True (on a computer with US-style date settings), but so does a value of "29/3/2002". I think the CDate function produces the same result for those two values, so you should test whether the result of CDate("3/4/2002" is March 4 or April 3 on your computers.)
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.