INTERACT FORUM

More => Old Versions => Media Center 11 (Development Ended) => Topic started by: EpF on April 26, 2005, 11:29:10 am

Title: Date Imported format
Post by: EpF on April 26, 2005, 11:29:10 am
How does MC11 format [Date Imported]?  I'm trying to use IsRange([Date Imported]),40320-10080) in an expression, and it's not working  :(

(it doesn't work reversing the numbers either)
Title: Re: Date Imported format
Post by: EpF on April 26, 2005, 11:37:45 am
Just realised I had a comma where I shouldn't have - it's not returning a syntax error now, but it still doesn't give me the right result...
Title: Re: Date Imported format
Post by: Matt on April 26, 2005, 12:56:48 pm
All dates are floating point numbers representing the number of days since 1900.  Negative numbers are supported.

We need to add some helper expression functions to make dates easier to work with.  Until then, FormatDate(...) may let you do some of what you want.
Title: Re: Date Imported format
Post by: EpF on April 26, 2005, 01:38:16 pm
Thanks a million, Matt; that explains a lot..  I had to laugh, cause I would never have figured that out, although I got the expression to work well enough in the end; this is what I did:

If(IsRange([Date Imported],1-38450), FormatDate([Date Imported], yyyy//MM), FormatDate([Date Imported], yyyy//MM//dd))

I wanted to tidy up my date imported list so it wasn't miles long, so I experimented with numbers until I got this.

We need to add some helper expression functions to make dates easier to work with.
Would these helper expressions allow the date to be calculated from the current date, so that, in the expression above, the amount of time where the date is given in detail always stays the same?   ::)

Thanks again.
Title: Re: Date Imported format
Post by: EpF on April 27, 2005, 06:23:57 am
Just thought of something else; it would be cool if there was some way of inverting the sorting in a View Scheme column, so that most recent dates were at the top...

 ::) ::)
Title: Re: Date Imported format
Post by: glynor on April 27, 2005, 08:53:06 am
~sort=[Date Imported]-d

"-d" (for decending I suppose) reverses sort order.
Title: Re: Date Imported format
Post by: EpF on April 27, 2005, 09:46:59 am
~sort=[Date Imported]-d

"-d" (for decending I suppose) reverses sort order.

Standard search parameters don't work in Advanced Expressions:

http://www.jrmediacenter.com/DevZone/DBExpressions.htm
Title: Re: Date Imported format
Post by: hit_ny on April 27, 2005, 01:25:46 pm
~sort=[Date Imported]-d

"-d" (for decending I suppose) reverses sort order.

EpF asked if it was possible to reverse sort the contents of the view scheme column.

The above sorts the contents below the viewscheme columns (if i'm not mistaken).

im on MC 10 ..so not sure if this works in MC 11.

Title: Re: Date Imported format
Post by: EpF on April 27, 2005, 02:30:29 pm
The above sorts the contents below the viewscheme columns (if i'm not mistaken).

No, you're not mistaken, but I was looking for something which would sort the viewscheme columns themselves.  Glynor's suggestion sorts the file list only...
Title: Re: Date Imported format
Post by: glynor on April 27, 2005, 11:01:58 pm
Ahh, sorry.  I misread.  I don't think there is a way... 

(I was actually quite shocked that you didn't know you could use the -d option, since you seem to definately be an advanced user otherwise... Now it all makes sense.)

I typically don't use the Column-style view (I prefer the Tree-View style with "populate tree" selected), so when you said column, I assumed you meant the columns (IE. Name, Media Type, etc) in the Grid view (the pane below your columns where the actual files are listed).
Title: Re: Date Imported format
Post by: EpF on April 27, 2005, 11:22:06 pm
(I was actually quite shocked that you didn't know you could use the -d option, since you seem to definately be an advanced user otherwise... Now it all makes sense.

 ::) ;)
Title: Re: Date Imported format
Post by: hit_ny on April 28, 2005, 02:42:58 am
No, you're not mistaken, but I was looking for something which would sort the viewscheme columns themselves.  Glynor's suggestion sorts the file list only...

Ahh...this feature has been requested for a long time, maybe they introduce it in v12.