# Remove time stamp from date

**URL:** <https://community.mp3tag.de/t/remove-time-stamp-from-date/59571>\
**Category:** Support\
**Created:** [December 30, 2022, 9:36pm UTC](https://community.mp3tag.de/t/remove-time-stamp-from-date/59571 "2022-12-30T21:36:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ceo54](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@ceo54](https://community.mp3tag.de/u/ceo54)\
**Post date:** [December 30, 2022, 9:36pm UTC](https://community.mp3tag.de/t/remove-time-stamp-from-date/59571/1 "2022-12-30T21:36:10Z")

</div>

How do I remove time stamp from date ? I'm using format values action and for year using this regular expression: `T\d{2}:\d{2}:\d{2}:\d{3}Z`

year is being written like this 2016-01-15T00:00:00.000Z, the above expression should work, anyone knows what am I doing wrong ?

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [December 30, 2022, 9:48pm UTC](https://community.mp3tag.de/t/remove-time-stamp-from-date/59571/2 "2022-12-30T21:48:58Z")

</div>

The regular expression does not match the string as the last separator is a full stop and no colon.  
Please note that the field YEAR is a 4-digit number according to the ID3 standard.  
To keep a more detailed date, try RELEASETIME

---

<div class="post-metadata">

**Author:** ![ceo54](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@ceo54](https://community.mp3tag.de/u/ceo54)\
**Post date:** [December 30, 2022, 9:53pm UTC](https://community.mp3tag.de/t/remove-time-stamp-from-date/59571/3 "2022-12-30T21:53:03Z")

</div>

> [@ohrenkino](#):
>
> The regular expression does not match the string as the last separator is a full stop and no colon.  
> Please note that the field YEAR is a 4-digit number according to the ID3 standard.  
> To keep a more detailed date, try RELEASETIME

Thank you for the response. I have no knowledge of expressions, I was using Google to find the expressions and trying them out. This one seems to be mentioned at more than one places so I assumed this to be correct.

Could you help me with what would be the correct expression ?

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [December 30, 2022, 9:54pm UTC](https://community.mp3tag.de/t/remove-time-stamp-from-date/59571/4 "2022-12-30T21:54:55Z")

</div>

then please show the complete expression and not just the snippet.  
Otherwise I assume:  
Format string: `$regexp(%year%,T\d{2}:\d{2}:\d{2}\.\d{3}Z,)`

To get a YEAR that complies with the standard:  
Format string: $num(%year%,1)

---

<div class="post-metadata">

**Author:** ![ceo54](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/77aa72/32.png) [@ceo54](https://community.mp3tag.de/u/ceo54)\
**Post date:** [December 30, 2022, 9:58pm UTC](https://community.mp3tag.de/t/remove-time-stamp-from-date/59571/5 "2022-12-30T21:58:47Z")

</div>

Works like a charm.

Thanks bud for all the help. You're a legend.

---

<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:** [January 29, 2023, 9:59pm UTC](https://community.mp3tag.de/t/remove-time-stamp-from-date/59571/6 "2023-01-29T21:59:01Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
