# Help with an action to change two-digit years to four-digit years

**URL:** <https://community.mp3tag.de/t/help-with-an-action-to-change-two-digit-years-to-four-digit-years/18640>\
**Category:** Support\
**Created:** [January 26, 2017, 4:14pm UTC](https://community.mp3tag.de/t/help-with-an-action-to-change-two-digit-years-to-four-digit-years/18640 "2017-01-26T16:14:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jstraw](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/51bf81/32.png) [@jstraw](https://community.mp3tag.de/u/jstraw)\
**Post date:** [January 26, 2017, 4:14pm UTC](https://community.mp3tag.de/t/help-with-an-action-to-change-two-digit-years-to-four-digit-years/18640/1 "2017-01-26T16:14:15Z")

</div>

Can anyone help me with an action that will look at the year, determine if it's four or two digits, and if it's two digits, prepend "19" to those digits. I need four digit years to remain in place unaltered.

I figured out how to write the year to a custom field, prepend the "19" and then write that back to the year field. That doesn't work because my four digit years wind up being six digit years such as "192017".

Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [January 26, 2017, 4:26pm UTC](https://community.mp3tag.de/t/help-with-an-action-to-change-two-digit-years-to-four-digit-years/18640/2 "2017-01-26T16:26:33Z")

</div>

Why an action?  
That is easily done with a filter  
"$len(%year%)" LESS 4  
and then by hand for all remaining files in one go.

Just mark all remaining files and add 19 to the year.

---

<div class="post-metadata">

**Author:** ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)\
**Post date:** [January 26, 2017, 4:34pm UTC](https://community.mp3tag.de/t/help-with-an-action-to-change-two-digit-years-to-four-digit-years/18640/3 "2017-01-26T16:34:51Z")

</div>

> [@jstraw](#):
>
> Can anyone help me with an action that will look at the year, determine if it's four or two digits, and if it's two digits, prepend "19" to those digits. I need four digit years to remain in place unaltered.
> 
> I figured out how to write the year to a custom field, prepend the "19" and then write that back to the year field. That doesn't work because my four digit years wind up being six digit years such as "192017".
> 
> Any help is appreciated.

Use Replace with regular Expression.

Regexp: (^\d\d$)  
With: 19$1

---

<div class="post-metadata">

**Author:** ![jstraw](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/51bf81/32.png) [@jstraw](https://community.mp3tag.de/u/jstraw)\
**Post date:** [January 26, 2017, 4:44pm UTC](https://community.mp3tag.de/t/help-with-an-action-to-change-two-digit-years-to-four-digit-years/18640/4 "2017-01-26T16:44:20Z")

</div>

> [@stevehero](#):
>
> Use Replace with regular Expression.
> 
> Regexp: (^\d\d$)  
> With: 19$1

That works perfectly. Thank you. It's just what I was looking for.

---

<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:** [February 9, 2026, 12:26pm UTC](https://community.mp3tag.de/t/help-with-an-action-to-change-two-digit-years-to-four-digit-years/18640/5 "2026-02-09T12:26:37Z")

</div>


