# \[SOLVED\] How can I make Picard NOT use the "full-date" but YEAR only...?

**URL:** https://community.metabrainz.org/t/solved-how-can-i-make-picard-not-use-the-full-date-but-year-only/554993
**Category:** MusicBrainz Picard
**Created:** [October 13, 2021, 5:16pm UTC](https://community.metabrainz.org/t/solved-how-can-i-make-picard-not-use-the-full-date-but-year-only/554993 "2021-10-13T17:16:51Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![leeuniverse](https://community.metabrainz.org/user_avatar/community.metabrainz.org/leeuniverse/32/48676_2.png) [@leeuniverse](https://community.metabrainz.org/u/leeuniverse)
#### Post date: [October 13, 2021, 5:16pm UTC](https://community.metabrainz.org/t/solved-how-can-i-make-picard-not-use-the-full-date-but-year-only/554993/1 "2021-10-13T17:16:51Z")

</div>

I’m assuming I have to do another “script”? Using 13 already ugh LOL.  
I’ve looked, but not sure how I can do it.

I’m of course talking about the “Date Tag”, many songs now have a full date there instead of a year, and I want that tag to be kept clean with just a year only.

Help… Thanks.

---

<div class="post-metadata">

### Author: ![rdswift](https://community.metabrainz.org/user_avatar/community.metabrainz.org/rdswift/32/7032_2.png) [@rdswift](https://community.metabrainz.org/u/rdswift)
#### Post date: [October 13, 2021, 5:37pm UTC](https://community.metabrainz.org/t/solved-how-can-i-make-picard-not-use-the-full-date-but-year-only/554993/2 "2021-10-13T17:37:57Z")

</div>

Have a look at the [$left()](https://picard-docs.musicbrainz.org/v2.6/en/functions/func_left.html) function. Also, as of Picard 2.7 there is a new [$year()](https://picard-docs.musicbrainz.org/v2.7/en/functions/func_year.html) function.

---

<div class="post-metadata">

### Author: ![leeuniverse](https://community.metabrainz.org/user_avatar/community.metabrainz.org/leeuniverse/32/48676_2.png) [@leeuniverse](https://community.metabrainz.org/u/leeuniverse)
#### Post date: [October 13, 2021, 7:45pm UTC](https://community.metabrainz.org/t/solved-how-can-i-make-picard-not-use-the-full-date-but-year-only/554993/3 "2021-10-13T19:45:06Z")

</div>

Great, sounds good, thank you.

---

<div class="post-metadata">

### Author: ![rdswift](https://community.metabrainz.org/user_avatar/community.metabrainz.org/rdswift/32/7032_2.png) [@rdswift](https://community.metabrainz.org/u/rdswift)
#### Post date: [October 13, 2021, 7:49pm UTC](https://community.metabrainz.org/t/solved-how-can-i-make-picard-not-use-the-full-date-but-year-only/554993/4 "2021-10-13T19:49:18Z")

</div>

> [@leeuniverse](#):
>
> I’m assuming I have to do another “script”? Using 13 already ugh LOL.

On another note, if you always use a few of the same scripts, you can always combine them into a single script. 😉

---

<div class="post-metadata">

### Author: ![leeuniverse](https://community.metabrainz.org/user_avatar/community.metabrainz.org/leeuniverse/32/48676_2.png) [@leeuniverse](https://community.metabrainz.org/u/leeuniverse)
#### Post date: [October 13, 2021, 8:03pm UTC](https://community.metabrainz.org/t/solved-how-can-i-make-picard-not-use-the-full-date-but-year-only/554993/5 "2021-10-13T20:03:55Z")

</div>

That would definitely be good, can you give me an example of like 3 $unset scripts, for example, “$unset(compilation)” what a group of them combined might look like?

Would definitely help with all the settings I have to change/save in a text file for future reference.  
Thanks

---

<div class="post-metadata">

### Author: ![rdswift](https://community.metabrainz.org/user_avatar/community.metabrainz.org/rdswift/32/7032_2.png) [@rdswift](https://community.metabrainz.org/u/rdswift)
#### Post date: [October 13, 2021, 11:51pm UTC](https://community.metabrainz.org/t/solved-how-can-i-make-picard-not-use-the-full-date-but-year-only/554993/6 "2021-10-13T23:51:15Z")

</div>

Just put each commend on a new line in the combined script. For example one of my test scripts is:

```auto
$noop( General Test Script )
$set(rds_artists,$if2(%artists%,%artist%,%albumartist%))
$set(rds_artist,$rreplace($if2(%artists%,%artist%,%albumartist%),;.*\$,))
$set(album,%album% [file])

```

---

<div class="post-metadata">

### Author: ![leeuniverse](https://community.metabrainz.org/user_avatar/community.metabrainz.org/leeuniverse/32/48676_2.png) [@leeuniverse](https://community.metabrainz.org/u/leeuniverse)
#### Post date: [October 25, 2021, 9:56pm UTC](https://community.metabrainz.org/t/solved-how-can-i-make-picard-not-use-the-full-date-but-year-only/554993/7 "2021-10-25T21:56:15Z")

</div>

I don’t have a scripting brain, but could you explain how I can get the $left() function and the new $year() function to work?

I put them in and I’m STILL getting “full dates” instead of the Year only?

![](https://i.imgur.com/pXqACbH.png)

---

<div class="post-metadata">

### Author: ![rdswift](https://community.metabrainz.org/user_avatar/community.metabrainz.org/rdswift/32/7032_2.png) [@rdswift](https://community.metabrainz.org/u/rdswift)
#### Post date: [October 25, 2021, 10:09pm UTC](https://community.metabrainz.org/t/solved-how-can-i-make-picard-not-use-the-full-date-but-year-only/554993/8 "2021-10-25T22:09:59Z")

</div>

How are you trying to use them? Unless I’m misunderstanding, it should be something as simple as:

```auto
$set(date,$left(%date%,4))

```

---

<div class="post-metadata">

### Author: ![leeuniverse](https://community.metabrainz.org/user_avatar/community.metabrainz.org/leeuniverse/32/48676_2.png) [@leeuniverse](https://community.metabrainz.org/u/leeuniverse)
#### Post date: [October 25, 2021, 10:18pm UTC](https://community.metabrainz.org/t/solved-how-can-i-make-picard-not-use-the-full-date-but-year-only/554993/9 "2021-10-25T22:18:04Z")

</div>

> [@rdswift](#):
>
> `$set(date,$left(%date%,4))`

LOL, I’m a scripting idiot… I had no idea about all that “extra” stuff. $set, adding “date” the (( )) etc.  
So I used

> $set(date,$year(date,date\_order=“ymd”))

per your information and it worked…

When I used **$unset(compilation)** and others, for example, I didn’t have to do any extra stuff to it, so I figured the above would work the same, hence my confusion. I was trying to use **$year(date,date\_order=“ymd”)** for example and it wouldn’t work.

You gave me what I needed… Thank you. 🙂 😋
