# Scripting: Create Decade from Year / Origyear

**URL:** <https://community.mp3tag.de/t/scripting-create-decade-from-year-origyear/11757>\
**Category:** Support\
**Created:** [March 20, 2011, 9:20pm UTC](https://community.mp3tag.de/t/scripting-create-decade-from-year-origyear/11757 "2011-03-20T21:20:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [March 21, 2011, 9:37am UTC](https://community.mp3tag.de/t/scripting-create-decade-from-year-origyear/11757/2 "2011-03-21T09:37:23Z")

</div>

> [@Wampanoag](#):
>
> Are there any good language descriptions for the MTA files?... then hand edit the MTA file ...

The MTA file resp. its content is subject of the Mp3tag application system and not subject to the common user.  
It is not recommended to edit MTA files manually, because of the special sovereign usage by the application itself.  
A bad formatted MTA file can cause bad behaviour of the application, which can bring harm to the data and to the user.  
If you want to know how to create an action resp. build a group of actions, then read the help manual, and do all changes to the action definitions by using the user interface of Mp3tag.

> [@Wampanoag](#):
>
> ... my intention is to create an action to create a Decade tag using the digits from the Year or Original Year tags, if they exist. Otherwise it is filled with "Unknown". ...

Yes, you can create an user defined tag-field 'DECADE'.

When the year number is given as format of 'YYYY', what digit is the 'decade digit'?  
Or do you want to extract a substring of century and decade digits?

Are you sure to write the text 'Unknown' to the tag-field 'DECADE'?  
Be aware of possible formatting problem when displaying the content of the tag-field.  
Shouldn't the tag-field better left empty (= not existing)?

DD.20110321.1135.CET

---

_[View the full topic](https://community.mp3tag.de/t/scripting-create-decade-from-year-origyear/11757)._
