How to Normalize the Dates


#1

I have about 10,000 files and I want to make the year look like this

(1984)

Currently they look like this

(1984.07)
(1977.12.31)
(1988.05)

How do I make them all just keep the year they currently have and eliminate the rest. I just want them all to look like this

(1988)

Thanks


#2

If you are sure that the year-part is always the leftmost bit then you could use an action of the type "Format tag field" for the the field YEAR:
Enter as format string
$left(%year%,4)

this leaves the left-most 4 characters.
Beware of dates that looks like this:
31.12.1977 the result would be 31.1
so perhaps you filter your tracks first to make sure you hit the right ones
%year% MATCHES ^\d\d\d\d.