# Remove the "-" from date

**URL:** https://community.mp3tag.de/t/remove-the-from-date/64043
**Category:** Support
**Created:** [March 11, 2024, 10:50pm UTC](https://community.mp3tag.de/t/remove-the-from-date/64043 "2024-03-11T22:50:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![TsiAwd](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/e56c9b/32.png) [@TsiAwd](https://community.mp3tag.de/u/TsiAwd)
#### Post date: [March 11, 2024, 10:50pm UTC](https://community.mp3tag.de/t/remove-the-from-date/64043/1 "2024-03-11T22:50:52Z")

</div>

`$regexp($regexp(%_file_create_date%,'(\d+)\.(\d+)\.(\d+)','0000$3-00$2-00$1'),'0*(\d{4})-0*(\d{2})-0*(\d{2})','$1-$2-$3')` How do I strip the "-" out of this string to output 20240311?

---

<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: [March 12, 2024, 6:52am UTC](https://community.mp3tag.de/t/remove-the-from-date/64043/2 "2024-03-12T06:52:47Z")

</div>

See e.g. here:

> [@Tag: copy "Date Created" to Comment](https://community.mp3tag.de/t/tag-copy-date-created-to-comment/5836/6):
>
> Well I have a column to see when the date was added to so the raw dont work so well. I'm sure with Harald's string properly formated with %\_file\_create\_date% to output yearmonthday it would work but I have no idea how to accomplish that.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [March 12, 2024, 7:49am UTC](https://community.mp3tag.de/t/remove-the-from-date/64043/3 "2024-03-12T07:49:21Z")

</div>

AFAIK the output of  
`%_file_create_date%`  
depends on your local Windows operating system language and settings.

In my German Windows 10, the unformatted content of the create date looks like this:  
`31.03.2024`  
also known as  
`DD.MM.YYYY`

The regular expression to change it to `20240331` (without any dividing characters) would look like this  
`$regexp(%_file_create_date%,'(\d+)\.(\d+)\.(\d+)','$3$2$1')`

You have to adjust the matching `(\d+)\.(\d+)\.(\d+)` part to the format you use in your local Windows.  
The above regular expression only works for a date divided by dots and where DD is the first match, MM the second match and YYYY the third match.

---

<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: [March 12, 2024, 7:58am UTC](https://community.mp3tag.de/t/remove-the-from-date/64043/4 "2024-03-12T07:58:39Z")

</div>

If the %\_file\_create\_date% should simply be stripped from its hyphens, then try this  
Format String: `$replace(%_file_create_date%,-,)`  
It does not rearrange the sequence of data parts, though, as that depends on your local unit settings.

---

<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: [April 11, 2024, 7:58am UTC](https://community.mp3tag.de/t/remove-the-from-date/64043/5 "2024-04-11T07:58:43Z")

</div>

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