INTERACT FORUM

Please login or register.

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

Author Topic: new expression evaluator  (Read 1379 times)

AndromAK

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 77
  • Omnes Vulnerant, Ultima Necat
new expression evaluator
« on: March 15, 2005, 01:52:42 pm »

I have some problem with the new released 11.0.214

in a View Scheme,

([Date (year)])   [Album]
doesn't work anymore, and shows
([Date (year)])   Abbey Road, for example

in another one,

[last played]:date(yyyy/MM/dd)
shows
38320,73777777778:date(yyyy/MM/dd)

How can I fix that with the new expression evaluator?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: new expression evaluator
« Reply #1 on: March 15, 2005, 01:55:26 pm »

MC 11.0.214 has a bug with field names that have parenthesis.  It'll be fixed tonight.

Your other expression uses the old style that's not supported now.  To format as a date, do this:

FormatDate([Last Played],yyyy/MM/dd)

There's documentation here:
http://www.jrmediacenter.com/DevZone/DBExpressions.htm


Logged
Matt Ashland, JRiver Media Center

AndromAK

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 77
  • Omnes Vulnerant, Ultima Necat
Re: new expression evaluator
« Reply #2 on: March 15, 2005, 02:17:18 pm »

Thank you for your quick answer!!

I noticed that:

FormatDate([Last Played],yyyy//MM//dd)
shows:
2005/03/15

rather than

FormatDate([Last Played],yyyy/MM/dd)
that shows:
20050315
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: new expression evaluator
« Reply #3 on: March 15, 2005, 02:27:39 pm »

Slash is the 'escape' character.  It allows, for example, something like this:
If(1, I actually want a comma here: /,, hopefully it understands I'm only the third parameter/, not the fourth)

So anyway, you need two slashes together to get an actual slash.
Logged
Matt Ashland, JRiver Media Center

AndromAK

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 77
  • Omnes Vulnerant, Ultima Necat
Re: new expression evaluator
« Reply #4 on: March 16, 2005, 09:30:07 am »

I noticed that the expression
FormatDate([Last Played],yyyy//MM//dd)
returns
1970/01/01
when the track hasn't been played.

So I improved the expression for those who are interested :

If(IsEqual([Number Plays], 0,2), no date, FormatDate([Last Played],yyyy//MM//dd) )

It now returns "no date" instead of "1970/01/01"

I hope it will be usefull for some people...
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42372
  • Shoes gone again!
Re: new expression evaluator
« Reply #5 on: March 16, 2005, 10:59:03 am »

Next build, you can change:

If(IsEqual([Number Plays], 0,2), no date, FormatDate([Last Played],yyyy//MM//dd) )

to

FormatDate([Last Played], yyyy//MM//dd, no date)
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up