# Replace US date format

**URL:** <https://community.mp3tag.de/t/replace-us-date-format/57884>\
**Category:** Support\
**Created:** [July 13, 2022, 3:05pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884 "2022-07-13T15:05:16Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gianni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/a4c791/32.png) [@Gianni](https://community.mp3tag.de/u/Gianni)\
**Post date:** [July 13, 2022, 3:05pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/1 "2022-07-13T15:05:16Z")

</div>

Dear all,  
I'd like to batch replace the following (all in TITLE)

title (11/5/79)

with

title (5NOV1979)

I do not want to have all title names with the same date BUT I want mp3tag to ''recognize'' the respective date.

I tried

$regexp(%TITLE%,(\d+)/(\d+)/(\d+),0$2.$1.19$3)

ok so far as a first compromise

But: I still fail to include to replace $1 with the respective month in uppercase letters

and I fail to omit the separating dots

In other words: I would like to convert

title (m/dd/yy)

into

title (ddMMM19yy)

example:

to go from  
title (11/5/79)  
to  
title (5NOV1979)

Thanks in advance for your 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:** [July 13, 2022, 3:25pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/2 "2022-07-13T15:25:29Z")

</div>

You could try:  
`$replace($regexp(title (11/5/79),(.*?) \((\d+)/(\d+)/(\d+)\),$1 ($3==$2==19$4)),==11==,NOV,==12==,DEC)`  
You would have to complete the list of months.

---

<div class="post-metadata">

**Author:** ![Gianni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/a4c791/32.png) [@Gianni](https://community.mp3tag.de/u/Gianni)\
**Post date:** [July 13, 2022, 5:38pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/3 "2022-07-13T17:38:34Z")

</div>

Dear ohrenkino

Thanks a lot for your prompt reply!

I've tried the following via [Konverter -\> tag-tag -\> Field: TITLE -\> format string]:

$replace($regexp(%TITLE%,(.\*?)((\d+)/(\d+)/(\d+)),$1 ($3==$2==19$4)),==1==,JAN,==2==,FEB,==3==,MAR,==4==,APR,==5==,MAY,==6==,JUN,==7==,JUL,==8==,AUG,==9==,SEP,==10==,OCT,==11==,NOV,==12==,DEC)

Now, I have any %TITLE% given. OK. But the date won't fix. Where is my mistake? What did I not see?

THANK YOU!  
Cheers.

---

<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:** [July 13, 2022, 5:41pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/4 "2022-07-13T17:41:59Z")

</div>

> [@Gianni](#):
>
> What did I not see?

If you try the string with your sample title - does it work?  
I tried it only with your example, so it should.  
If you find that also, great. If not, you would have to see where the difference is.  
And then you have to see what the real data in TITLE looks like ...

Edit:  
The expression should be:  
`$replace($regexp(%TITLE%,(.*?)\((\d+)/(\d+)/(\d+)\),$1 ($3==$2==19$4)),==1==,JAN,==2==,FEB,==3==,MAR,==4==,APR,==5==,MAY,==6==,JUN,==7==,JUL,==8==,AUG,==9==,SEP,==10==,OCT,==11==,NOV,==12==,DEC)`

---

<div class="post-metadata">

**Author:** ![Gianni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/a4c791/32.png) [@Gianni](https://community.mp3tag.de/u/Gianni)\
**Post date:** [July 13, 2022, 6:13pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/5 "2022-07-13T18:13:53Z")

</div>

Dear ohrenkino

Thanks!

E.g. I have the following title:

I Know (4/25/79 Version)

and I want to convert that title to

I Know (25APR1979 Version)

That's all.  
But there are other titles in my collection with different song names and different dates.  
So I like to find a solution that does the whole batch with different dates as input and the specific dates as output.

Example:  
I have:  
I Know A Lot (5/25/79 Version)  
I Do Know (4/14/79 Version)  
I Know Not (4/8/79 Version)

And I'd like to have as a result:

I Know A Lot (25MAY1979 Version)  
I Do Know (14APR1979 Version)  
I Know Not (8APR1979 Version)

with one command.

Thank you very much!

G

---

<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:** [July 13, 2022, 6:15pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/6 "2022-07-13T18:15:23Z")

</div>

You have the word "Version" inside the brackets. That is a different pattern to just the date.

---

<div class="post-metadata">

**Author:** ![Gianni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/a4c791/32.png) [@Gianni](https://community.mp3tag.de/u/Gianni)\
**Post date:** [July 13, 2022, 6:15pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/7 "2022-07-13T18:15:40Z")

</div>

> [@ohrenkino](#):
>
> $replace($regexp(%TITLE%,(.\*?)((\d+)/(\d+)/(\d+)),$1 ($3==$2==19$4)),==1==,JAN,==2==,FEB,==3==,MAR,==4==,APR,==5==,MAY,==6==,JUN,==7==,JUL,==8==,AUG,==9==,SEP,==10==,OCT,==11==,NOV,==12==,DEC)

Unfortunately your last command suggestion doesn't give me the desired results.  
☹

---

<div class="post-metadata">

**Author:** ![Gianni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/a4c791/32.png) [@Gianni](https://community.mp3tag.de/u/Gianni)\
**Post date:** [July 13, 2022, 6:16pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/8 "2022-07-13T18:16:56Z")

</div>

Sorry. I did not mention this.

---

<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:** [July 13, 2022, 6:17pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/9 "2022-07-13T18:17:42Z")

</div>

So add "Version" to the pattern inside the brackets and it should work.

`$replace($regexp(I Know (4/25/79 Version),(.*?)\((\d+)/(\d+)/(\d+) Version\),$1 ($3==$2==19$4 Version)),==1==,JAN,==2==,FEB,==3==,MAR,==4==,APR,==5==,MAY,==6==,JUN,==7==,JUL,==8==,AUG,==9==,SEP,==10==,OCT,==11==,NOV,==12==,DEC)`

---

<div class="post-metadata">

**Author:** ![Gianni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/a4c791/32.png) [@Gianni](https://community.mp3tag.de/u/Gianni)\
**Post date:** [July 13, 2022, 6:45pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/10 "2022-07-13T18:45:45Z")

</div>

> [@ohrenkino](#):
>
> $replace($regexp(I Know (4/25/79 Version),(.\*?)((\d+)/(\d+)/(\d+) Version),$1 ($3==$2==19$4 Version)),==1==,JAN,==2==,FEB,==3==,MAR,==4==,APR,==5==,MAY,==6==,JUN,==7==,JUL,==8==,AUG,==9==,SEP,==10==,OCT,==11==,NOV,==12==,DEC)

Dear ohrenkino

Thanks a lot for your help!

I modified your suggestion a little:

$replace($regexp(%TITLE%,(.\*?)((\d+)/(\d+)/(\d+) Version),$1 ($3==$2==19$4 Version)),==1==,JAN,==2==,FEB,==3==,MAR,==4==,APR,==5==,MAY,==6==,JUN,==7==,JUL,==8==,AUG,==9==,SEP,==10==,OCT,==11==,NOV,==12==,DEC)

Now I am very close to what I want. Sometimes there is version in brackets and sometimes not. So I am looking for a insignificantly broader solution.

With my last shown code (the small modification of your code (I put %TITLE% instead of the real song name part and I omitted the following bracket) but it works quite well as I get:

(with the original filename which was:)

I Know I'm Not Wrong (8/13/79 Version)

I apply the last code and I get:

I Know I'm Not Wrong (13AUG1979 Version)

QUITE GOOD!  
So the date part has been taken care of thanks to you!  
Thanks!  
There are two spaces between the song name and the opening bracket.  
I would like to have one only there.

And then I'd like to have a broader command where it doesn't matter if there are letters after the date or not.  
Maybe there is a fill argument for ignoring the rest to come inside the brackets?  
Thanks a lot!  
G

There a

---

<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:** [July 13, 2022, 6:50pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/11 "2022-07-13T18:50:51Z")

</div>

You could try:  
`$replace($regexp(I Know (4/25/79 Version),(.*?)\((\d+)/(\d+)/(\d+.*)\),$1 ($3==$2==19$4)),==1==,JAN,==2==,FEB,==3==,MAR,==4==,APR,==5==,MAY,==6==,JUN,==7==,JUL,==8==,AUG,==9==,SEP,==10==,OCT,==11==,NOV,==12==,DEC)`

---

<div class="post-metadata">

**Author:** ![Gianni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/a4c791/32.png) [@Gianni](https://community.mp3tag.de/u/Gianni)\
**Post date:** [July 13, 2022, 6:53pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/12 "2022-07-13T18:53:28Z")

</div>

> [@Gianni](#):
>
> $replace($regexp(%TITLE%,(.\*?)((\d+)/(\d+)/(\d+) Version),$1 ($3==$2==19$4 Version)),==1==,JAN,==2==,FEB,==3==,MAR,==4==,APR,==5==,MAY,==6==,JUN,==7==,JUL,==8==,AUG,==9==,SEP,==10==,OCT,==11==,NOV,==12==,DEC)

I am sorry: above was a backslash missing between ''(.\*?)'' and ''((\d+)''

the following code was the one that brought me close:

$replace($regexp(%TITLE%,(.\*?)((\d+)/(\d+)/(\d+) Version),$1 ($3==$2==19$4 Version)),==1==,JAN,==2==,FEB,==3==,MAR,==4==,APR,==5==,MAY,==6==,JUN,==7==,JUL,==8==,AUG,==9==,SEP,==10==,OCT,==11==,NOV,==12==,DEC)

but only where it has ''version'' in it (inside the brackets).

Thank you very very much!  
G

---

<div class="post-metadata">

**Author:** ![Gianni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/a4c791/32.png) [@Gianni](https://community.mp3tag.de/u/Gianni)\
**Post date:** [July 13, 2022, 6:55pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/13 "2022-07-13T18:55:37Z")

</div>

Sorry, but I am a little confused. Maybe when I copy paste, this web page doesn't accept my backslashes.  
It is omitted anew.

Thanks anyway!

---

<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:** [July 13, 2022, 6:56pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/14 "2022-07-13T18:56:21Z")

</div>

You have to enclose the code in the grave accent (Top left to bottom right)

---

<div class="post-metadata">

**Author:** ![Gianni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/a4c791/32.png) [@Gianni](https://community.mp3tag.de/u/Gianni)\
**Post date:** [July 13, 2022, 7:31pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/15 "2022-07-13T19:31:37Z")

</div>

`$replace($regexp(%TITLE%,((\d+)/(\d+)/(\d+)),$1($3==$2==19$4)),==1==,JAN,==2==,FEB,==3==,MAR,==4==,APR,==5==,MAY,==6==,JUN,==7==,JUL,==8==,AUG,==9==,SEP,==10==,OCT,==11==,NOV,==12==,DEC)`

I am very close with this last code.

Now I can have any word before the date in the brackets and any word after the date in the brackets.

BUT: It nevertheless repeats the old format date and right after puts the new formatted date behind in brackets.

Example:

[Old song name:]  
Tusk (Stage Riff; 1/30/79 Demo)

[New song name:]  
Tusk (Stage Riff; 1/30/79(30JAN1979) Demo)

Now I just have to get rid of the first old formatted date part and the brackets around the newly formatted date.

Thanks

---

<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:** [July 13, 2022, 7:36pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/16 "2022-07-13T19:36:54Z")

</div>

Why don't you copy my suggestions and work with them?  
The suggestion in #11

> [@Replace US date format](https://community.mp3tag.de/t/replace-us-date-format/57884/11):
>
> You could try: $replace($regexp(I Know (4/25/79 Version),(.\*?)\((\d+)/(\d+)/(\d+.\*)\),$1 ($3==$2==19$4)),==1==,JAN,==2==,FEB,==3==,MAR,==4==,APR,==5==,MAY,==6==,JUN,==7==,JUL,==8==,AUG,==9==,SEP,==10==,OCT,==11==,NOV,==12==,DEC)

already took care of extra text behind the date.

---

<div class="post-metadata">

**Author:** ![Gianni](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/g/a4c791/32.png) [@Gianni](https://community.mp3tag.de/u/Gianni)\
**Post date:** [July 13, 2022, 7:39pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/17 "2022-07-13T19:39:11Z")

</div>

Dear ohrenkino

I think I have the solution:

`$replace($regexp(%TITLE%,((\d+)/(\d+)/(\d+)),$3==$2==19$4),==1==,JAN,==2==,FEB,==3==,MAR,==4==,APR,==5==,MAY,==6==,JUN,==7==,JUL,==8==,AUG,==9==,SEP,==10==,OCT,==11==,NOV,==12==,DEC)`

Now I can have anything inside the brackets to the left or to the right of the date.

THANK YOU VERY MUCH!

G

---

<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:** [August 12, 2022, 7:40pm UTC](https://community.mp3tag.de/t/replace-us-date-format/57884/18 "2022-08-12T19:40:13Z")

</div>

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