# Convert/Action: YEAR Convert

**URL:** <https://community.mp3tag.de/t/convert-action-year-convert/60668>\
**Category:** Support\
**Created:** [April 10, 2023, 8:01pm UTC](https://community.mp3tag.de/t/convert-action-year-convert/60668 "2023-04-10T20:01:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dec](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dec/32/13699_2.png) [@dec](https://community.mp3tag.de/u/dec)\
**Post date:** [April 10, 2023, 8:01pm UTC](https://community.mp3tag.de/t/convert-action-year-convert/60668/1 "2023-04-10T20:01:39Z")

</div>

ok, guys, why is this argument not working, but returns NULL

$cutRight(%year%,$len(%year%)-4)

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [April 10, 2023, 8:08pm UTC](https://community.mp3tag.de/t/convert-action-year-convert/60668/2 "2023-04-10T20:08:13Z")

</div>

to subtract 2 values you have to use the function $sub()  
`$cutRight(%year%,$sub($len(%year%),4))`  
Unfortunately, you do not supply the real source data - in cases where year looks like 2023-04-10 this works also:  
`$num(%year%,1)`

---

<div class="post-metadata">

**Author:** ![dec](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dec/32/13699_2.png) [@dec](https://community.mp3tag.de/u/dec)\
**Post date:** [April 10, 2023, 8:16pm UTC](https://community.mp3tag.de/t/convert-action-year-convert/60668/3 "2023-04-10T20:16:21Z")

</div>

> [@ohrenkino](#):
>
> $num(%year%,1)

hmm. thanks

i tried $num and it worked fine on a typical example; but i should have sorted the list by Year to check for atypical/different values/formats, because i now i have a lot of blank and '0000' Year fields (butr most are ok).

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [May 10, 2023, 8:16pm UTC](https://community.mp3tag.de/t/convert-action-year-convert/60668/4 "2023-05-10T20:16:48Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
