INTERACT FORUM

Please login or register.

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

Author Topic: Sorting Last Played In Chronilogical Order  (Read 1498 times)

stevenf

  • Regular Member
  • World Citizen
  • ***
  • Posts: 209
  • It works for me....
Sorting Last Played In Chronilogical Order
« on: January 02, 2007, 08:17:39 pm »

Is there anyone out there who knows how sort the last played field in correct order. right now, the field is sorted by day, regardless of the month or year. What i need is for the field to be sorted by month, year then day. Here's an example of what i mean.

01/01/06
01/02/06
01/03/06
02/01/06
02/02/06
02/03/06
03/01/06 and so on

This is what it looks like when i attempot to sort one my playlists. I want the field to sort in the order that the songs were played in. Here's an example

01/01/06
02/01/06
03/01/06
01/02/06
02/02/06
03/02/06 and so on

Incidentally this is a new field created using an expresssion, this is the expression that was used, many thanks to Marko for the expression.

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

All help greatly appreciated

Steven F
Logged

zirum

  • Galactic Citizen
  • ****
  • Posts: 403
  • still learning.
Re: Sorting Last Played In Chronilogical Order
« Reply #1 on: August 10, 2007, 03:08:10 am »

If i understand you correctly, you may get the sorting you want by using this:
FormatDate([Last Played, 0], MM//yyyy//dd)

But i am having problems putting this into the smartlist wizard. It keeps splitting up the expression... I have tried using a custom expression with the following

Type       Expression
Custom    sort=FormatDate([Last Played, 0], yyyy-MM,1900-01)

But it ends up like this

Type       Expression
Custom    sort=FormatDate
Custom    (
Custom    [Last Played, 0],
Custom    yyyy-MM,1900-01
Custom    )

This gives no result... Any help?
Logged
Note to myself: Read, think, write - Read, think, write - think, read, write - think, write, read - think, write, read... Aahhw, i always mess that up...

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9162
Re: Sorting Last Played In Chronilogical Order
« Reply #2 on: August 10, 2007, 03:29:44 am »

You don't need a field to be showing to sort by it.

If you want to sort by [last played], then all you need to do is sort by it. Simply place the sort rule in step 4 of a viewscheme, or the sort rules found under 'customise current view'

~sort=[last played]

or

~sort=[last played]-d

---------------
to achieve the kind of thing zirum is trying, you would need to create a custom library field from the expression, then sort by that field in the usual way.

-marko.

zirum

  • Galactic Citizen
  • ****
  • Posts: 403
  • still learning.
Re: Sorting Last Played In Chronilogical Order
« Reply #3 on: August 10, 2007, 03:50:45 am »

Didn't know of that way to use a library field. Thats could be a handy way of storing customized expression i would suppose.

Thanks as always, marko!  :)


Logged
Note to myself: Read, think, write - Read, think, write - think, read, write - think, write, read - think, write, read... Aahhw, i always mess that up...

stevenf

  • Regular Member
  • World Citizen
  • ***
  • Posts: 209
  • It works for me....
Re: Sorting Last Played In Chronilogical Order
« Reply #4 on: August 11, 2007, 04:30:17 am »

Zirum

This works in sorting the fild, but it is displayed as Month, Year, day, not Day, Month, and then year, any ideas?

Thanks
Steven F
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9162
Re: Sorting Last Played In Chronilogical Order
« Reply #5 on: August 11, 2007, 05:16:29 am »

I'm getting confused:

<snip>
What i need is for the field to be sorted by month, year then day.
<snip>

Zirum

This works in sorting the fild, but it is displayed as Month, Year, day, not Day, Month, and then year, any ideas?
If you use the field you have already created (FormatDate([Last Played, 0], dd//MM//yyyy)) in the view scheme, and specify ~sort=[last played] in either step 4 of the view scheme properties dialogue or the sort section of the 'customise current view' dialogue, it will sort as you desire. (I think :) )

For me, sorting by using clicks on the header of MC's built-in [last played] field work as expected. MC obviously treats that field as a date, not a number, whereas it's treating the custom field as purely numerical, hence the unexpected sorting. For this reason, the only benefit gained from this custom field is aesthetics. I can't recall, but I wonder if I offered that custom field solution to you back in the day when MC used to default to displaying [last played] in an "elapsed time" format. Back then, this was the only way to get the sorting correct as "1 day ago", "1 year ago" etc. would never sort in the correct order.
With MC12, [last played] sorts perfectly with clicks on its list header.

-marko.
Pages: [1]   Go Up