INTERACT FORUM

Please login or register.

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

Author Topic: FormatDate Issue  (Read 1996 times)

c1c9k72

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 332
  • So many worlds, so much to do, so little done...
FormatDate Issue
« on: February 21, 2006, 04:14:14 pm »

I've been struggling with this for a while, and it's probably very simple.  When I have a TV show, I like to encode the date of first airing into the filename.  It used to work very simply with the following expression: [Album]-[Track #]-[Date (Year)]-[Date (Month)]-[Date (Day)]-[Name].

What I would end up with is something like: House MD-101-2004-12-16-Pilot.avi
However, lately, I've been ending up with: House MD-101-2004-December-16-Pilot.avi

MC11 handles months fine, but other software doesn't.  I'd like to return to the old method of doing it with just numbers, but I can't figure out how to make the formatdate system work.  Where would I enter the formatdate expression ?  And how exactly would I code it to do what I'd like to do ?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: FormatDate Issue
« Reply #1 on: February 21, 2006, 04:16:31 pm »

Fields get formatted by default with MC 11.1.

Switch:
[Date (Month)] to [Date (Month), 0]

Also, you could use this as a shortcut:
FormatDate([Date, 0], yyyy-MM-dd)

More details:
http://www.jrmediacenter.com/DevZone/DBExpressions.htm

Logged
Matt Ashland, JRiver Media Center

c1c9k72

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 332
  • So many worlds, so much to do, so little done...
Re: FormatDate Issue
« Reply #2 on: February 21, 2006, 04:32:52 pm »

Thanks for the help, Matt, but when I enter this:

[Album]-[Track #]-[Date (Year)]-[Date (Month) ,0]-[Date (Day)]-[Name]

It tells me that [Date (Month), 0] is an invalid keyword, and requests I correct it.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: FormatDate Issue
« Reply #3 on: February 21, 2006, 04:57:20 pm »

You found a bug.  Rename supports expressions, but the syntax checker was too aggressive.

It'll be fixed next build.
Logged
Matt Ashland, JRiver Media Center

c1c9k72

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 332
  • So many worlds, so much to do, so little done...
Re: FormatDate Issue
« Reply #4 on: February 21, 2006, 08:49:43 pm »

I just downloaded 11.1.126 and tested the "rename file from properties" modifications.  I fed it [Album]-[Track #]-[Date (Year)]-[Date (Month), 0]-[Date (Day)]-[Name] and it still leaves the month in word form.

While I've got you on the subject of formatting, I do have one other question.  I'd like to ensure that my track numbers are a specific length, like 2 digits or 3.  Is that possible ?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: FormatDate Issue
« Reply #5 on: February 21, 2006, 09:20:28 pm »

Use this instead of that string of calculated fields:
FormatDate([Date, 0], yyyy-MM-DD)

I think track number will autmatically use two digits when you do a rename.
Logged
Matt Ashland, JRiver Media Center

c1c9k72

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 332
  • So many worlds, so much to do, so little done...
Re: FormatDate Issue
« Reply #6 on: February 21, 2006, 09:27:13 pm »

That last formula fixed the date problem completely.  Thanks a lot, Matt.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: FormatDate Issue
« Reply #7 on: February 22, 2006, 03:33:03 am »

You found a bug.  Rename supports expressions, but the syntax checker was too aggressive.

It'll be fixed next build.

Neville found it a few days ago...

if it is a bug, the team will see this and most probably fix it. if nothing else, the above method will save you waiting.
regards,
-marko.

thanks for the fix.

Neville

  • Regular Member
  • World Citizen
  • ***
  • Posts: 117
  • I am the black crow king...
Re: FormatDate Issue
« Reply #8 on: February 22, 2006, 03:47:23 am »

Thank you for fixing this  :)
Logged
Pages: [1]   Go Up