Wildcard for one OR more digits?

giffordpinchot

Registered User.
Local time
Today, 18:34
Joined
Nov 22, 2005
Messages
10
Hello, I'm trying to use wildcards to filter for records that contain a date somewhere within the string.

I'm using Like "*#.##.##*" which works for dates that have a day of the months >10, but what about those under?

Well, Like "*#.#.##*" only works for those with the day of month <10. Is there a wildcard character for "one or more digits"?

Also, the above example excludes Oct. - Dec. for the same reason.

help!

Thanks,
Gifford
 
You obviously realise that storing data like this causes searching problems!

You could OR the criteria:
Like "*#.##.##*" OR Like "*#.#.##*" OR Like "*##.##.##*" OR Like "*##.#.##*"
 
You obviously realise that storing data like this causes searching problems!

You could OR the criteria:
Like "*#.##.##*" OR Like "*#.#.##*" OR Like "*##.##.##*" OR Like "*##.#.##*"

Yup, that'll work. Thanks. But isn't there a cleaner way for future reference?

Yes, I understand the problem with storing the date that way, that's why I'm extracting them now before there are too many of them. My application evolves!!!

Thanks...
 
Cleaner way? Given that you are searching for a pattern of numbers within a text field that represent a date, I'd go with anything that works!
 
there is a function called isdate() returns true or false

what I have done in the past to parse a string of unknown length containing a date is to
loop though the whole string starting with the 1st four chars and increasing by one until isdate() returns true or I have exhausted the string
 

Users who are viewing this thread

Back
Top Bottom