how to test string for proper formatting (1 Viewer)

dreamdelerium

Registered User.
Local time
Today, 02:58
Joined
Aug 24, 2007
Messages
88
hey everyone. i was wondering if anyone knows how to test a string to see if its formatted corretly. on a form, before sending it to the table, i have a field for Date of birth. because some of the people who will be filling in this form dont know their birthdays i need to be able to take in three varietys of strings. they are:

dd/mm/yyyy or yyyy or unknown. i need to differentiate between the first two because i need to figure out the ages.

thanks
 

chergh

blah
Local time
Today, 10:58
Joined
Jun 15, 2004
Messages
1,414
You can differentiate between the dd/mm/yyyy and yyyy simply by using the 'len' function
 

dreamdelerium

Registered User.
Local time
Today, 02:58
Joined
Aug 24, 2007
Messages
88
duh

yeah, that should work. why didnt i think of that lol
 

Users who are viewing this thread

Top Bottom