I would like to create 2 smart groups. 1 for members under 18 and one for members over 18. There is no search criteria for age rather only a static date. Any idea?
Create two tags: Under 18 and 18+.
Create two Rules:
- A generic trigger such as "Individual is changed" or "Individual is added". CiviRules has a condition called "Age Comparison". You can set it to less than 18. Then, for the action, 'add Tag to contact' using Under 18.
- Same trigger, Age Comparison condition - greater than or equal to 18. But here have two actions: 'add Tag to contact 18+' as well as 'remove Tag from contact - Under 18' (to catch the people after they have turned 18).
Create two smart group that looks for your respective tags. Any time a contact is updated in some way (if you go the 'Individual is changed' route), the Rules will fire and lead to updated smart groups.
Not doable via UI afaik, and I don't recall anyone adding a custom search for this but there was a wiki page about that once upon a time - ah here which may give you or someone else a head start - though it may need updating of course.