Copy part of Album to Year

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

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!

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

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!

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

woot! thanks again :slight_smile:

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