Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date check

Status
Not open for further replies.

edelman

Instructor
Jun 7, 2002
12
IL
hello'

i'm looking for a function that check the validation of a date

thanks
 
check to see what? if it's a date type or if it's in a certain format(entered correctly)? ----------------
Joe
 
hello again

i would like to check if the date is valid without use
the type of the date ?

so i look for a function that check if the month is ok and the day and the year and so on .

thanks
 
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.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top