Conditional tagging involving years in range

Good evening!

I want to create a if function to populate %comment% with data if %year% ranges from 1980 to 1989. I tried to learn my way unsuccessfully... ...example follows...

Action type: Format value
Format string: $if($eql($regexp(%year%,^(198\d|1989)$),Eighties,)

I would appreciate any help you could give me. Thank you in advance for your attention! :slight_smile:

I do not think that you have files from 1198 or 2198 so it would be sufficient to check if 198 can be found in YEAR:


$if($eql($div(%YEAR%,10),196),'Sixties',) $if($eql($div(%YEAR%,10),197),'Seventies',) $if($eql($div(%YEAR%,10),198),'Eighties',) ... or ... $div(1960,10)'0s' ==> '1960s' $div(1970,10)'0s' ==> '1970s' $div(1980,10)'0s' ==> '1980s' ... or ... $left(%YEAR%,3)'0s' ==> 'yyy0s'


Thank you, it worked perfectly! :slight_smile: