# Copy part of Album to Year

**URL:** <https://community.mp3tag.de/t/copy-part-of-album-to-year/56638>\
**Category:** Support\
**Created:** [March 9, 2022, 4:31am UTC](https://community.mp3tag.de/t/copy-part-of-album-to-year/56638 "2022-03-09T04:31:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![boognish43](https://community.mp3tag.de/user_avatar/community.mp3tag.de/boognish43/32/11272_2.png) [@boognish43](https://community.mp3tag.de/u/boognish43)\
**Post date:** [March 9, 2022, 4:31am UTC](https://community.mp3tag.de/t/copy-part-of-album-to-year/56638/1 "2022-03-09T04:31:18Z")

</div>

Hi all, I promise I searched all over and tried a bunch of things before coming here 🙂

I'm trying to take part of the album name and use it for the year field.

i.e. All of the albums are in this format 1999-12-31 - Big Cypress Seminole Indian Reservation - Big Cypress, FL . The date followed by space - space Location. Id like to only pull the date out of here and add it to the year tag field, can anyone help me figure out how to build the Action for this to happen?

For clarity, Id like 1999-12-31 from the above example to be set as the year.

Thanks so much for any help!

---

<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:** [March 9, 2022, 7:00am UTC](https://community.mp3tag.de/t/copy-part-of-album-to-year/56638/2 "2022-03-09T07:00:39Z")

</div>

You could try an action of the type "Format value"  
Format string: `$regexp('1999-12-31 - Big Cypress Seminole Indian Reservation - Big Cypress, FL .',(.*?) - .*,$1)`

Replace the example string with the source field reference.  
Just a note: According to standard, YEAR has only 4 digits. If you want to store longer dates, think about using RELEASETIME

---

<div class="post-metadata">

**Author:** ![boognish43](https://community.mp3tag.de/user_avatar/community.mp3tag.de/boognish43/32/11272_2.png) [@boognish43](https://community.mp3tag.de/u/boognish43)\
**Post date:** [June 22, 2022, 3:42pm UTC](https://community.mp3tag.de/t/copy-part-of-album-to-year/56638/3 "2022-06-22T15:42:51Z")

</div>

> [@ohrenkino](#):
>
> `$regexp('1999-12-31 - Big Cypress Seminole Indian Reservation - Big Cypress, FL .',(.*?) - .*,$1)`

Hi again, apologies for not coming back after your answer, my project got sidetracked and I forgot to come thank you.

I was never able to get this to work and hoping you could help me a bit more. So ive got thousands of live albums listed this way, but cant figure out how to pull the date into the year, I basically want the first 10 digits to be pulled into the year field (1999-12-31) for this example.

I understand the year usually only has 4 digits, but the software I use to play the files, plexamp utilizes the full date in the year tag.

thanks again!

EDIT, I figured it out!

Action  
Format Value  
Field : YEAR  
Format String: $left(%album%,10)

woot! thanks again 🙂

---

<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:** [July 22, 2022, 3:43pm UTC](https://community.mp3tag.de/t/copy-part-of-album-to-year/56638/4 "2022-07-22T15:43:45Z")

</div>

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