Change date format from %dummy% (year-month-day) to %dummy% (Month/day/year)

Hello,

I have a bunch of pretagged files that are appended by the date. For example: Ramble on Rose (1973-12-19). Some are in this format. Others are in (12-28-88) format (month-day-last two digits of year).

I want to convert them into the format I use which is %title% (month/day/year) for example: Ramble on Rose (12/19/1973).

Once I get that sorted I would like to get the resultant value in %title% (month/day/year) and trasfer the information to the album title in Four digit year-Month-Day format). EX: 1995-05-23 - 30 Days of Dead.

I searched but could not find an answer. I cannot figure out how to do it on my own so I thought I would ask to see if some one here did.

Thanks in advance!

You could try:
$regexp('Ramble on Rose (1973-12-19)','(.*?\()(\d+)-(\d+)-(\d+).',$1$3/$4/$2')')

-> "Ramble on Rose (12/19/1973)"
You would have to filter for files with the 4-digit-year like
%title% MATCHES "(\d\d\d\d"

Thanks but I am having trouble figuring out what you are doing. Does the actual title have to be included? I was hoping to use this for many different titles.

Also, I got an error saying it found a closing ) with no corresponding opening parenthesis.The error occurred while parsing the regular expression fragment: '3/$4/$2')'>>>>HERE>>>>0'

Oops - an error was not intended:
$regexp('Ramble on Rose (1973-12-19)','(.*?\()(\d+)-(\d+)-(\d+).','$1$3/$4/$2)')

Replace the title string with the field variable (e.g. %title%) - I only wanted to point out that the expression works with the sample string that you supplied.

No problem! Thanks so much for your help as always!

Alright, I tried a TAG>TAG and I placed

$regexp(%title%,'(.*?()(\d+)-(\d+)-(\d+).','$1$3/$4/$2)') in the Format String box

"Feel Like A Stranger (6-23-1990)" turned into "Feel Like A Stranger (23/1990/6)"

Should I be using an Action instead?

Yes, no wonder as ...

is a different pattern from

MP3tag does not "read" the number, it takes the first number and puts it in last place, takes the second and puts it in first.
That is why I said that the provided regular expression works with the provided sample string.

:roll_eyes:Sorry about that! I did not notice it. You are right and I realize it does not read it. It works now. :blush:

Thank you so much, once again for your invaluable help! :clap: :clap: :raised_hands: :facepunch:

So I can understand this better if I had the same circumstance but now the date is in (09-27-1973) format and I want to change it to (1973-09-27), how would the script change.

I can't seem to figure out why its $1$3/$4/$2

Wait, I figured it out. It would be: $regexp(%title%,'(.*?()(\d+)-(\d+)-(\d+).','$1$4-$2-$3)')
First Term,4th Term, 2nd Term, Third Term. I am beginning to understand a bit more...

Nothing to add here (@ohrenkino is a genius), except hello from another Deadhead. I have hundreds of live shows, and spent a lot of time in Mp3tag figuring out the best way to tag them. Good luck!

Hey there! Weir everywhere! Yeah, I am tagging everything by date and then appending the album info at the end in brackets. I am actually writing a manual on my methodology because I find I need a reference as my projects are so varied. Once I am done I would be happy to share.

And yes, Ohrenkino is a very kind genius!

Please do share! I've written some notes myself, as I have live recordings (FKA bootlegs) from many different sources, for many different groups. And I found I needed different TAG standards for different uses.

Feel free to share what you have so far.

I will once I am done and I believe it has been sussed out.

1 Like