INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Convert Date tag to YYYY?  (Read 3379 times)

dmitch77

  • World Citizen
  • ***
  • Posts: 193
Convert Date tag to YYYY?
« on: August 22, 2016, 09:18:06 pm »

I'm sort of cross-posting here from the Remotes list (topic "JRemote can't display Date tag in format other than YYYY ") due to no responses seen. I just need a workaround, presumably at the MC22 level.

Most of my audio files have a simple 4-digit year in the Date tag (1972, etc.). Some, however, have the Date as MM/DD/YYYY. JRemote appears to not be able to display the latter; files with MM/DD/YYYY formatted date have an empty field wherever JRemote displays the date (Info panel, song lists, etc.)

If it were just a few files, I'd just manually convert all of the MM/DD/YYYY files to the YYYY Date format, but I have hundreds of them. Does anyone know a reasonably easy way I can convert all of those MM/DD/YYYY formatted Date tags to YYYY? Thanks.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8939
Re: Convert Date tag to YYYY?
« Reply #1 on: August 23, 2016, 12:32:41 am »

My answer assumes this works on a MAC the same way it does in Windows. Try one or two to be sure before going wholesale. Press refresh after trying the first couple to have them removed from your list.

First gather all those files in a list...
one way to do this is to open a view that has all of your audio files and then, in the search bar up there in the top right, paste this:
Code: [Select]
[=isequal([date],//,7)]=1
Confirm that the results are those you want, and select all files in the list.
Open the tag window. (lower left corner)
The Date field will show "[Varies]" (without quotes), click to open it for editing, and paste this in there:

Code: [Select]
=removeleft([date],6)
and press enter.
Job (should be) done.

If you're not happy, press ctrl+z to undo.

I say "should be" done because dates can be tricky with different locales and so on, but doing this way should get you the results you want reagardless of all that.

-marko

dmitch77

  • World Citizen
  • ***
  • Posts: 193
Re: Convert Date tag to YYYY?
« Reply #2 on: August 23, 2016, 10:48:39 am »

That's a good trick to know, but it doesn't quite cut it: it only works if the selected files all have the same number of digits in the MM/DD/YYYY date. Single-digit months (1/20/2016) or days (10/1/1999) don't work with that conversion, they end up with Date tag 0. Again there are too many to selectively pick the right ones.... Thanks.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: Convert Date tag to YYYY?
« Reply #3 on: August 23, 2016, 11:01:14 am »

If you really want to just overwrite all of your dates with the year, the solution is very simple:

Just put =[Year] into the Date field for selected files.  Seems to work with no problems.  I just tried in on 25 files.  I'm sure it will work for thousands as well; that's what MC does!  :)

Brian.
Logged

dmitch77

  • World Citizen
  • ***
  • Posts: 193
Re: Convert Date tag to YYYY?
« Reply #4 on: August 23, 2016, 11:06:29 am »

Perfect. Ya learn something new every day (if you're lucky). Thanks!
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8939
Re: Convert Date tag to YYYY?
« Reply #5 on: August 23, 2016, 11:41:06 am »

If you really want to just overwrite all of your dates with the year, the solution is very simple:

Just put =[Year] into the Date field for selected files.  Seems to work with no problems.  I just tried in on 25 files.  I'm sure it will work for thousands as well; that's what MC does!  :)

Brian.
DOH! :D

For some reason, before bedtime, my tired mind thought that [year] was a custom user field I had made. Thanks Brian.
Pages: [1]   Go Up