Reformat A Custom Date Field

I am a frustrated newbie trying to create my first Replace with Regular Expression action. Here is my situation:

Filename: Ozzie And Harriet_520321_The Ego Builder.mp3

I have successfully extracted the date from the filename to a custom field %otrdate%.

I want to change the %otrdate% field as follows

520321 to 1952-03-21

I performed the following steps:

  • I opened Actions > Action Group
  • Clicked on New to create a new Action Group and named it Test
  • I selected Action Type: Replace with regular expression
  • I entered the following into the fields
    • Field: Selected %OTRDATE%
    • Regular Expression: (\d\d)(\d\d)(\d\d)
    • Replace matches with: 19$1-$2-$3
  • Clicked on OK
  • Clicked on OK to save the expression
  • I checked on the Test action group to enable it
  • I clicked on apply, but I do not see any change.

Since I have yet to do my first successful replacement, I’m not sure what piece I’m missing. I modified another expression to try to accomplish what I wanted, but maybe I have the wrong syntax and it can’t find what I think I’m searching for.

Once I get my first one working, I feel confident that I can modify this one, create other Action Groups to account for other date variations I encounter and then select the one I need for the particular date issue in the file I’m working on.

Any help her will be greatly appreciated!

The field name has to be OTRDATE.
Have a look at your tagfields with the extended tag view (ALT-t). You probaly now have an additional field named %otrdate%.

That was it. It works! Once I dropped the % signs from the field name, it worked as expected. Now I have the confidence to create additional actions for other date scenarios.

THANK YOU!