# Script/Format to Extract Month from Year for Track Number

**URL:** https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482
**Category:** Mac
**Created:** [May 13, 2025, 8:04am UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482 "2025-05-13T08:04:40Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Sithko](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Sithko](https://community.mp3tag.de/u/Sithko)
#### Post date: [May 13, 2025, 8:04am UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/1 "2025-05-13T08:04:40Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [May 13, 2025, 8:06am UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/2 "2025-05-13T08:06:18Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Sithko](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Sithko](https://community.mp3tag.de/u/Sithko)
#### Post date: [May 13, 2025, 8:12am UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/3 "2025-05-13T08:12:30Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Sithko](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Sithko](https://community.mp3tag.de/u/Sithko)
#### Post date: [May 13, 2025, 5:25pm UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/4 "2025-05-13T17:25:15Z")

</div>

Hello again, here I come to explain my case.

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

 ![Captura de pantalla 2025-05-13 a las 19.15.28](https://community.mp3tag.de/uploads/default/original/3X/d/f/dff0afa40e1781ca2fdcb8c02d5ce3e92eb3671a.png)

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

 ![Captura de pantalla 2025-05-13 a las 19.12.08](https://community.mp3tag.de/uploads/default/original/3X/d/4/d42679724922485b053e9fabd4c08ec5f0034660.png)

 ![Captura de pantalla 2025-05-13 a las 19.18.17](https://community.mp3tag.de/uploads/default/original/3X/d/8/d80f3e5f7a5916e7d109eb3018e8a290bb645d5f.png)

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.

---

<div class="post-metadata">

### Author: ![Sithko](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Sithko](https://community.mp3tag.de/u/Sithko)
#### Post date: [May 13, 2025, 5:30pm UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/5 "2025-05-13T17:30:33Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [May 13, 2025, 7:32pm UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/6 "2025-05-13T19:32:53Z")

</div>

Is there still an open question?

---

<div class="post-metadata">

### Author: ![Sithko](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Sithko](https://community.mp3tag.de/u/Sithko)
#### Post date: [May 13, 2025, 8:08pm UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/7 "2025-05-13T20:08:09Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [May 13, 2025, 8:27pm UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/8 "2025-05-13T20:27:35Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Sithko](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Sithko](https://community.mp3tag.de/u/Sithko)
#### Post date: [May 13, 2025, 8:41pm UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/9 "2025-05-13T20:41:26Z")

</div>

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

Thank you

---

<div class="post-metadata">

### Author: ![Sithko](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Sithko](https://community.mp3tag.de/u/Sithko)
#### Post date: [May 13, 2025, 10:45pm UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/10 "2025-05-13T22:45:37Z")

</div>

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).

 ![Captura de pantalla 2025-05-14 a las 0.37.17](https://community.mp3tag.de/uploads/default/original/3X/5/6/563a0dd84c2bf407be0ba5b6c0995848ff5b63a2.png)

 ![Captura de pantalla 2025-05-14 a las 0.37.32](https://community.mp3tag.de/uploads/default/original/3X/c/c/cce887e0b3b630dc41bedda445488f40e4347d53.png)

---

<div class="post-metadata">

### Author: ![Sithko](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Sithko](https://community.mp3tag.de/u/Sithko)
#### Post date: [May 13, 2025, 10:46pm UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/11 "2025-05-13T22:46:14Z")

</div>

I also leave the MP3TAG configuration

 ![Captura de pantalla 2025-05-14 a las 0.41.05](https://community.mp3tag.de/uploads/default/original/3X/2/6/26d8c1f12770ee982463329815b0858ba8dbdba8.jpeg)

 ![Captura de pantalla 2025-05-14 a las 0.42.58](https://community.mp3tag.de/uploads/default/original/3X/4/1/418648d0104cec65bbc4401b7031152a2dd9ff6c.png)

 ![Captura de pantalla 2025-05-14 a las 0.40.31](https://community.mp3tag.de/uploads/default/original/3X/f/7/f78f1fc033c598e639eaff9cc3a0e4047799dedf.jpeg)

I think playing so much makes it more complicated

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [May 14, 2025, 7:59am UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/12 "2025-05-14T07:59:13Z")

</div>

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](https://forums.pioneerdj.com/hc/en-us/articles/360024701851-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.

---

<div class="post-metadata">

### Author: ![Sithko](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Sithko](https://community.mp3tag.de/u/Sithko)
#### Post date: [May 14, 2025, 8:10am UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/13 "2025-05-14T08:10:39Z")

</div>

> [@Florian](#):
>
> '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.

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?

> [@Florian](#):
>
> 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.

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

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [May 14, 2025, 8:25am UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/14 "2025-05-14T08:25:35Z")

</div>

> [@Sithko](#):
>
> 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?

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.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [May 14, 2025, 8:28am UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/15 "2025-05-14T08:28:12Z")

</div>

> [@Florian](#):
>
> 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.

> [@Sithko](#):
>
> how can I restore that configuration? I need the remixing field to only report the data that I put manually.

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`

---

<div class="post-metadata">

### Author: ![Sithko](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Sithko](https://community.mp3tag.de/u/Sithko)
#### Post date: [May 14, 2025, 8:34am UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/16 "2025-05-14T08:34:54Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Sithko](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Sithko](https://community.mp3tag.de/u/Sithko)
#### Post date: [May 14, 2025, 8:35am UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/17 "2025-05-14T08:35:50Z")

</div>

> [@Florian](#):
>
> 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:

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

---

<div class="post-metadata">

### Author: ![Sithko](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Sithko](https://community.mp3tag.de/u/Sithko)
#### Post date: [May 14, 2025, 11:02am UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/18 "2025-05-14T11:02:39Z")

</div>

Is it correct? I understand that yes

 ![Captura de pantalla 2025-05-14 a las 13.00.51](https://community.mp3tag.de/uploads/default/original/3X/3/f/3f0181b6f27cbbcdf7372bdc91359091cf4bf77d.png)

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?

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [May 14, 2025, 11:29am UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/19 "2025-05-14T11:29:31Z")

</div>

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:

> [@Florian](#):
>
> 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.

---

<div class="post-metadata">

### Author: ![Sithko](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/c89c15/32.png) [@Sithko](https://community.mp3tag.de/u/Sithko)
#### Post date: [May 14, 2025, 11:51am UTC](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482/20 "2025-05-14T11:51:44Z")

</div>

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](https://community.mp3tag.de/uploads/default/original/3X/2/1/2155c619d624c1ae3a85ac26455074ece518a99c.png)

 ![Captura de pantalla 2025-05-14 a las 13.49.26](https://community.mp3tag.de/uploads/default/original/3X/7/1/71d4c14908de143b378c6d8cf455869b3e4364ed.png)

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

> [@Florian](#):
>
> 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 still have to try this

[Next page](https://community.mp3tag.de/t/script-format-to-extract-month-from-year-for-track-number/68482.md?page=2)
