# Trimming YEAR field

**URL:** https://community.mp3tag.de/t/trimming-year-field/8082
**Category:** Support
**Created:** [March 14, 2009, 12:08pm UTC](https://community.mp3tag.de/t/trimming-year-field/8082 "2009-03-14T12:08:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![moley6knipe](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@moley6knipe](https://community.mp3tag.de/u/moley6knipe)
#### Post date: [March 14, 2009, 12:08pm UTC](https://community.mp3tag.de/t/trimming-year-field/8082/1 "2009-03-14T12:08:09Z")

</div>

Sorry, tried searching and I'm a numpty with RegExp, so I'm gonna have to ask!

How to I trim a value of eg 2009-12-12 T00:00:00Z in the YEAR field to just 2009 ?

I know it's obvious, but I can't get eg LEFT function to do it, and can't find anything in the help files.

TIA

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [March 14, 2009, 3:42pm UTC](https://community.mp3tag.de/t/trimming-year-field/8082/2 "2009-03-14T15:42:43Z")

</div>

This is how you can use the $left function:

_Action type:_ **Format value**  
_Field:_ **YEAR**  
_Format string:_ **$left(%year%,4)**

---

<div class="post-metadata">

### Author: ![moley6knipe](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@moley6knipe](https://community.mp3tag.de/u/moley6knipe)
#### Post date: [March 14, 2009, 5:21pm UTC](https://community.mp3tag.de/t/trimming-year-field/8082/3 "2009-03-14T17:21:47Z")

</div>

Thanks Dano, that's about the only thing I didn't try. I'm not being stupid, am I - I can't find the syntax for this RegExp in the help anywhere?! P'raps it's just me!! Thanks again...

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [March 14, 2009, 5:44pm UTC](https://community.mp3tag.de/t/trimming-year-field/8082/4 "2009-03-14T17:44:10Z")

</div>

This is not a Regex. It is a simple scripting language. Look in the help for "Scripting functions".

---

<div class="post-metadata">

### Author: ![moley6knipe](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@moley6knipe](https://community.mp3tag.de/u/moley6knipe)
#### Post date: [March 16, 2009, 9:25pm UTC](https://community.mp3tag.de/t/trimming-year-field/8082/5 "2009-03-16T21:25:38Z")

</div>

Bingo! That explains it, thanks for the help!

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:21pm UTC](https://community.mp3tag.de/t/trimming-year-field/8082/6 "2026-02-09T12:21:25Z")

</div>


