Author Topic: Function for time display?  (Read 2286 times)

Corliss Rain

  • Jr. Member
  • **
  • Posts: 63
Okay, I know there's the $Date function to display a date in your preferred format, but is there something similar for Time? Album Duration displays as minutes:seconds (75:18), but I'd prefer hours:minutes:seconds (1:15:18). Can it be done with a virtual tag using a function?

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9348
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

Corliss Rain

  • Jr. Member
  • **
  • Posts: 63
Thanks, phred. Unfortunately, it doesn't work on the Album Duration tag.

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1269
Code
$If($Div($Split(<Album Duration>,:,1),60)<1,$If(<Genre>="Classical",,00:)$Pad($Split(<Album Duration>,:,1),2):$Pad($Split(<Album Duration>,:,2),2),$Pad($RoundDown($Div($Split(<Album Duration>,:,1),60),0),2):$Pad($Mod($Split(<Album Duration>,:,1),60),2):$Split(<Album Duration>,:,2))

Corliss Rain

  • Jr. Member
  • **
  • Posts: 63
Code
$If($Div($Split(<Album Duration>,:,1),60)<1,$If(<Genre>="Classical",,00:)$Pad($Split(<Album Duration>,:,1),2):$Pad($Split(<Album Duration>,:,2),2),$Pad($RoundDown($Div($Split(<Album Duration>,:,1),60),0),2):$Pad($Mod($Split(<Album Duration>,:,1),60),2):$Split(<Album Duration>,:,2))

Thank you so much, that did exactly what I wanted! I'd have never figured that out on my own.