The date format in the "year" field in files downloaded from iTunes or albums with iTunes format is "2019-10-04T12:00:00Z".
This format is problematic for archives and folders of albums.
Is there a way to keep the " first four characters " and remove the rest of the characters so that only the release year of the album is stored in the files "year" field?
2019-10-04T12:00:00Z == change to ==> 2019
If the number of characters is more than four, the first four characters are kept and the rest of the characters are removed as many as they are, so that it is only stored in the album release year date field. Remove more characters
If you are sure that the first 4 characters in YEAR always contains the year number with 4 digits, then you could use
Convert Tag - Tag
Field: YEAR
Format string: $left(%YEAR%,4)
This would not work for a YEAR looking like this:
10-04-2019T12:00:00Z
$num(x,y) takes the digits from the left until the first non-numeric character.
In the example string
2019-10-04T12:00:00Z
the first non-numeric character from the left is the - between 2019 and 10.
So 2019 will be returned and padded with 1 digit.
Since 2019 is already 4 digits long, there is no visible padding.
If you would use $num(%year%,6)
you would get
002019