Script/Format to Extract Month from Year for Track Number

Hello everyone,

I'm trying to achieve something specific with Mp3tag and would appreciate some guidance.

I have FLAC and MP3 files, and I need to extract the month from the information stored in the 'Year' field. My goal is to then populate the 'Track Number' field with this extracted month (as a two-digit number, e.g., '01' for January, '12' for December).

Could someone please provide a script or tag formatting sequence that would allow me to extract only the month from the 'Year' field and write it to the 'Track Number' field?

Thank you in advance for your help!

It depends on the contents of the year field. Can you give an example?

Thanks Florian for your reply. I don't have my computer with me right now to provide an example, but I'll try to explain myself better this afternoon.

Hello again, here I come to explain my case.

I have mp3 and Flac songs where the following info appears:

But in mp3tag the date it shows me is the download date, not when the file was created. (well and now it doesn't show it to me in any way in mp3tag, I've touched something:frowning: )

I want to get the information of the year or Date added (in rekordbox) to be seen in "Date of departure" in RB, but I can't get RB to read the label, so it occurred to me to use the "Clue" field of MP3TAG to extract the month from the YEAR field with two digits

What I want is that the YEAR field can be written in a field that can read RekordBox 7.1

If you can also help me understand the reason why you have deleted the info from the YEAR field (it won't let me write it manually either).

Thank you.

Ok, I have already managed to solve that the year appears :slight_smile:

Is there still an open question?

Yes, I need to be able to take the metadata from the Year field to another field that Rekordbox reads in its Exit Date field.

What I have solved is that the year was deleted and it didn't let me save the value in the field

Thank you

Can you fill the Exit Date field in Rekordbox and check via Cmd+T in Mp3tag, which field name is used for that?

Good test!! I hadn't fallen for that. As soon as I can, I'll try it and comment.

Thank you

Nothing, there was no way, no matter how much I write in RB values in the fields and then updated with CMD+T in MP3TAG, it does not return information to me. I leave you the fields that should be able to edit in RB 7.0 (they are the same as the free version 6).

I also leave the MP3TAG configuration

I think playing so much makes it more complicated

I've now installed RB7 and the release date is not stored to the file itself but RB's internal database. It's also not read from any common fields for FLAC, so I think it's at the moment not possible to edit the release date for FLAC outside of Rekordbox and have it displayed in the app.

This is also in line with the Rekordbox Metadata Matrix, which shows the release date as field not being read or written for FLAC.


As a side note: The configuration for "Remezclador" (which is Remixer) in Mp3tag is wrong in both cases: for the File List you're using the COMMENT field, for the Tag Panel you're using ORIGYEAR. My guess is that you've changed those just for testing, but I wanted to mention anyway.

You are a crack! Thank you very much for confirming what I already feared, that RB has a closed system of labels, a shame.

At this point, as I can do, so that from MP3 I can extract only the mm of the year and put it in the track field?

This is my failure, to touch so I have broken it, how can I restore that configuration? I need the remixing field to only report the data that I put manually.

Forgive my English, I use a translator

Given that YEAR is stored as YYYY-MM-DD, you can use Convert → Tag - Tag for field TRACK using $mid(%year%,6,2) as formatstring.

You'd just use the correct field names. For FLAC files you could use MIXARTIST or REMIXER — the field names are used directly without mapping for FLAC.

If you want to start from scratch, you can use Terminal.app while Mp3tag being closed and paste this command to restore the File List columns:

defaults delete app.mp3tag.Mp3tag Columns

And this one to restore the Tag Panel fields:

defaults delete app.mp3tag.Mp3tag TagPanelFields

I think I've understood, I'm going to try it. Thank you

I do not have much configuration that I now remember, I will review and if it is expendable I execute it. Thank you

Is it correct? I understand that yes

Attention: I don't want to lose the value of the year in the TAG

And how can I make that value see in the track field?

Why would you use YEAR as field? I thought you want to copy the month part to the TRACK field. If so, you'd need to use TRACK as field.

As I wrote before:

Thank you @Florian for your help, with that command I have managed to extract the data of the year and see it on the track

Captura de pantalla 2025-05-14 a las 13.49.07

The only thing that in MP3 shows me MM and in Rekordbox only M, but that's already a problem of RB

I still have to try this