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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Validation

Status
Not open for further replies.

dinu79

Programmer
Mar 24, 2002
17
0
0
IN
hello
i want to validate date in a textbox
and its format must be dd-mm-yyyy
i have settled the dataformat property to dd-mm-yyyy
now if i will enter date such as 02-14-2000
it should be invalid but it automatically converts it into
format mm/dd/yyyy
how cat i do that
Bye for now

Dinesh
 
hi,

The more secure way is to control the Keypress, you have to program the procedure once, after you just have to adapt it for other program... its better than maskedit

DAY:
you check the first key can be between 0 and 3,
the second depends on the first, if the first wasn't 3, it can bet between 0 and 9 (deal later with February), if it was 3 it should be 0 or 1

MONTH:
you check the first key can be 0 or 1, the second depends on the first and of the day and so on and so forth
Mal'chik [bigglasses]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top