getmusicbee.com

Support => Questions => Topic started by: jmead on November 02, 2020, 08:24:04 PM

Title: truncating Date Modified so it can be used in a sort
Post by: jmead on November 02, 2020, 08:24:04 PM
I use MusicBee to prepare my radio show. Since the show is partially based on music submitted by labels or promoters, I like to have Music Bee show me tracks by descending Modified Date.

Here's my issue: I'd like tracks to appear as if sorted as follows:

Modified Date (desc) / Album / Track#

Tracks usually do appear by date/Album, but the track# are usually not in ascending order. I suspect this is because if/when I edit the tracks, they are not all saved at exactly the same moment. So when the tracks are displayed, they're out of order because if track 1 was saved before track 2, then track 2 will appear first because it's a descending time list by a few milliseconds. (Note that this means that really the secondary sort--Album--is also irrelevant.)

So my question is: is there a way to truncate the modified date so that (milli)seconds are not taken into account? Then my custom sort would work (most of the time).

Thanks,
Jonathan
Title: Re: truncating Date Modified so it can be used in a sort
Post by: psychoadept on November 02, 2020, 08:51:45 PM
Hi, welcome to the forum!

Yes, you could use a virtual tag for this. Virtual tag functions include $Date(), which can be used to format a date value for your needs.

You can find more info here:
https://musicbee.fandom.com/wiki/Virtual_Tags
https://musicbee.fandom.com/wiki/Functions
Title: Re: truncating Date Modified so it can be used in a sort
Post by: jmead on November 02, 2020, 11:19:56 PM
Oh, cool. You ARE a hero member!

Thanks.
Title: Re: truncating Date Modified so it can be used in a sort
Post by: Zak on November 03, 2020, 01:35:38 PM
In case it wasn't obvious, it would be over-complicating things to create a virtual tag that 'truncates' the (milli)seconds from the modified date.
Just create a tag that turns the date into a numeric value which can always be sorted chronologically.

i.e.
Code
$Date(<Date Modified>,yyyyMMdd)