Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Titleformatting: Displaying the earliest release date based on several fields (Read 582 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Titleformatting: Displaying the earliest release date based on several fields

How can I properly display only the earliest date from any one these fields, %DATE%, %DISCOGS_RELEASED% or %DISCOG_MASTER_RELEASE_DATE%?

Thanks
Quis custodiet ipsos custodes?  ;~)

Re: Titleformatting: Displaying the earliest release date based on several fields

Reply #1
Year would be easy enough...

Code: [Select]
$min($year(%DATE%),$year(%DISCOGS_RELEASED%),$year(%DISCOG_MASTER_RELEASE_DATE%))

Date is tricky and I'm too lazy to think about it.  :D

 

Re: Titleformatting: Displaying the earliest release date based on several fields

Reply #2
Date this way perhaps -

Code: [Select]
$insert($insert($min($replace($date(%DATE%),-,),$replace($date(%DISCOGS_RELEASED%),-,),$replace($date(%DISCOG_MASTER_RELEASE_DATE%),-,)),-,4),-,7)

Re: Titleformatting: Displaying the earliest release date based on several fields

Reply #3
Date is tricky and I'm too lazy to think about it.  :D
Yah, it is. Your solution works well enough and it's better than where I got to. Thanks.
Quis custodiet ipsos custodes?  ;~)

Re: Titleformatting: Displaying the earliest release date based on several fields

Reply #4
Date this way perhaps -
Displays :1990--" with just year data and displays 0-- with %DATE% set to yyyy/mm/dd

but it looks like the right approach, thanks
Quis custodiet ipsos custodes?  ;~)

Re: Titleformatting: Displaying the earliest release date based on several fields

Reply #5
Code: [Select]
$max(%DATE%,$min($year(%DATE%),$year(%DISCOGS_RELEASED%),$year(%DISCOG_MASTER_RELEASE_DATE%)))
Quis custodiet ipsos custodes?  ;~)