Jump to content

Find unique # in a field containg a list of #'s


This topic is 6527 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I have a numeric field (theDay) that is displayed as Check Boxes with a Value List containing the numbers 1 to 31 that represents the days of a month. I would like to find out if the day from a date field (theDate) has been checked in theDay field. I cannot use PatternCount(theDay,day(theDate)) because if the day is 1 then a match will be made on any day with a 1 in it such as 1, 10...19, 21, 31.

e.g.

[ ] 1 [x] 2 [ ] 3 ...... would match with 2/3/2004

[ ] 11 .....

[x] 21 ..... would not match with 2/3/2004

Link to comment
Share on other sites

  • Newbies

Fenton, Thanks for the reply.

I can get the Day# by using the day() function as shown above in my first post. My problem is related to how data is stored in a field that is filled using the checkbox/valuelist method.

The following examples show what I mean:

"SatMonTue"

This string was imported from a checkbox/valuelist field that has days of week.

"102322"

This string is the one I am interested. It comes from another checkbox/valuelist field with the values 10,23,22 selected.

Using the day() function I can extract the day from the date. So for 2/3/2004 I get the value 2 for the day.

I now want to see if 2 (which is the day from the above date) appears in the string "102322" without detecting the 2 in 23 and 22.

So in this example there should be no match.

Hope this explains my problem a little better.

premier

Link to comment
Share on other sites

This topic is 6527 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.