INTERACT FORUM
More => Old Versions => Media Center 11 (Development Ended) => Topic started by: EpF on January 09, 2006, 03:34:06 am
-
I couldn't find the release notes which explain this one... How does the date format work in 11.1 now? (for stuff like if [date imported] is-greater-than 7 days)
Thanks
-
I'd like to know this as well....It seems that [Last Played]=>=20000 in a smartlist for example doesn't work anymore :(
-
for stuff like if [date imported] is-greater-than 7 days
[date imported]=>7d
excludes files imported within the past seven days.
It seems that [Last Played]=>=20000 in a smartlist for example doesn't work anymore
[last played]=>=14d
excludes files played in the past two weeks.
I couldn't find the release notes which explain this one...
http://yabb.jriver.com/interact/index.php?topic=30193.0
MC 11.1 -- New syntax for search by date
-
Thanks alot!
/Martin
-
[date imported]=>7d
excludes files imported within the past seven days.
[last played]=>=14d
excludes files played in the past two weeks.
http://yabb.jriver.com/interact/index.php?topic=30193.0
MC 11.1 -- New syntax for search by date
Heh! I had a little bet with myself that it'd be you, Marko, who replied first on this one!! ;D
Thanks!
-
New question on the same topic: I now have the problem that this doesn't work:
FormatDate([Date Imported], yyyy)
I just get either 1899 or 1900 - has something else changed in 11.1 that solves this?
-
In another thread:
From what I can tell, [last played] will be automatically formated, so the FormatDate command doesn't work
I was messing around with my Expression a bit more, and discovered that it is only the year which doesn't get formatted properly. I have another Date Imported formatted:
FormatDate([Date Imported], MM//dd)
Which works fine...
?
-
skeeterfood provides the answer in the message you linked to.
try: formatdate([date imported,0],yyyy)
works for me here.
-
D'oh!
Works for me too! (Must remember to read full entries in future!)
:-[
-
I'll tentatively say that I have another problem now; I've tried numerous variations of this, and none of them will do what I expect:
If( [Date Imported]=>1y, FormatDate( [Date Imported,0], yyyy ), FormatDate( [Date Imported,0], yy//MM//dd ) )
All I get is a year; it ignores the 'if' part and just formats the imported date as a year, so I have all years from 2003 to 2006 in the pane. I've tested this using If( [Date Imported]=>1y, 1, 0 ) as well, and all I get is '1'. (I also tried if( [date imported,0]=>524160, ... as well as swapping =>1y and =>y1 - to no avail).
What am I missing?
-
I don't know, looks fine to me, but as I was messing around I came up with this Decade Expression:
Mid([Date],0,2)If(IsRange(FormatDate([Date,0],yy),00-09),00,If(IsRange(FormatDate([Date,0],yy),10-19),10,If(IsRange(FormatDate([Date,0],yy),20-29),20,If(IsRange(FormatDate([Date,0],yy),30-39),30,If(IsRange(FormatDate([Date,0],yy),40-49),40,If(IsRange(FormatDate([Date,0],yy),50-59),50,If(IsRange(FormatDate([Date,0],yy),60-69),60,If(IsRange(FormatDate([Date,0],yy),70-79),70,If(IsRange(FormatDate([Date,0],yy),80-89),80,If(IsRange(FormatDate([Date,0],yy),90-99),90))))))))))'s
Produces output like: 1970's, 2000's, ...
If you create it as a new calculated library field (I called it Decade), you can add it to a view scheme and it works with the new "Library Browser" mode :)
I have a feeling it might be kinda slow for a large library though...
I wonder if Mid([Date],2,4) or FormatDate([Date,0],yy) is faster?
-John
-
Lazy as I am, I promptly call for a wizard in MC interface, handling the new date implementation.
Just like the other dialogs when using search and smartlists.
This is getting kind of ridiculous...It shouldn't be this hard to use dates!
-
I'll tentatively say that I have another problem now; I've tried numerous variations of this, and none of them will do what I expect:
If( [Date Imported]=>1y, FormatDate( [Date Imported,0], yyyy ), FormatDate( [Date Imported,0], yy//MM//dd ) )
All I get is a year; it ignores the 'if' part and just formats the imported date as a year, so I have all years from 2003 to 2006 in the pane. I've tested this using If( [Date Imported]=>1y, 1, 0 ) as well, and all I get is '1'. (I also tried if( [date imported,0]=>524160, ... as well as swapping =>1y and =>y1 - to no avail).
What am I missing?
EpF, just half an answer for now...
the way that If(...) works is...
If this expression---> (expression), is true, do this instructions if true otherwise, do this instructions if false)
so yours would kick off something like if(isrange([date imported],
a simple working example is the expression
if(isequal([rating],0,2),not rated,[rating]))
make a pane out that to see it in action.
that's half the answer. I don't have a working expression to offer you. I'm also inclined to think that it can't be done directly via an expression.
What you're asking is, if [date imported] is in the range of 0 to 1 years, then display this, and if not, then display that instead. You want to group the dates. If you load the standard [date imported] view item, you will notice that grouping is not available.
-
EpF, just half an answer for now...
the way that If(...) works is...
If this expression---> (expression), is true, do this instructions if true otherwise, do this instructions if false)
so yours would kick off something like if(isrange([date imported],
a simple working example is the expression
if(isequal([rating],0,2),not rated,[rating]))
make a pane out that to see it in action.
that's half the answer. I don't have a working expression to offer you. I'm also inclined to think that it can't be done directly via an expression.
What you're asking is, if [date imported] is in the range of 0 to 1 years, then display this, and if not, then display that instead. You want to group
the dates. If you load the standard [date imported] view item, you will notice that grouping is not available.
My old 'Date Imported' expression was:
If(IsRange([Date Imported],1-38400), FormatDate([Date Imported], yyyy), If(IsRange([Date Imported],1-38655), FormatDate([Date Imported], yy//MM), FormatDate([Date Imported], yy//MM//dd))
The problem was that as time went by, I'd have to edit the time ranges to reflect the new months and weeks, so I thought the new format of >7d etc. would be ideal; I'll have to look into it further...
-
why don't you look up my "recently imported" view in the "reinvent the wheel" thread and see if that would work for you.
It will need a little tweaking now that there's new syntax and no media library, but I reckon you've got enough there to set you off in the right direction.
You can either create an "all media" variety on the tree root, or create individual schemes in each media type node, it's up to you.
sometimes a good old smartlist based viewscheme is still the way to go. I see expressions as an extension of MC, not a replacement for anything particular within it.