Hi,
I'v been trying to create a custom field, a field which is similar to the "Last Played" and "Last Skipped" fields where the value will show the longest time since played/skipped which ever one is longest ago. This works fine, however this custom field will not sort like the "Last Played" field.
Dates are set to day-month-year on my pc and this below is typical of the values the field shows.
01/03/2012 13:00
01/04/2012 14:00
02/03/2012 13:00
It's clearly sorting the field like a numeric value. I assume i will need to tell the field it is to display dates and i'm not sure how to do that in the expression editor.
This is the calculated field contents. I stopped developing it when i noticed the problem, so i know it won't deal with "never played/skipped values. Can anyone tell me how i get the field to act like a date field when sorting?
ifElse(compare([Last Played,0],>,[Last Skipped,0]),[Last Played],
compare([Last Skipped,0],>,[Last Played,0]),[Last Skipped])