# Formatting date entries

**URL:** https://community.mp3tag.de/t/formatting-date-entries/8243
**Category:** Support
**Created:** [April 15, 2009, 10:34am UTC](https://community.mp3tag.de/t/formatting-date-entries/8243 "2009-04-15T10:34:33Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![tonyorob](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/c68b51/32.png) [@tonyorob](https://community.mp3tag.de/u/tonyorob)
#### Post date: [April 15, 2009, 10:34am UTC](https://community.mp3tag.de/t/formatting-date-entries/8243/1 "2009-04-15T10:34:33Z")

</div>

Hullo - I have just become a member and I would appreciate help in formatting date entries which I have placed in the COMMENTS field.  
These entries are at present written as numbers e.g. 20090415 (representing 15 April 2009).  
Is there a way of formatting these entries as 2009 April 14 ?  
I have searched the forum and FAQs and have not as yet found an answer.  
I have found the program to be very helpful, thankyou. Tonyorob.

---

<div class="post-metadata">

### Author: ![newser](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/b9bd4f/32.png) [@newser](https://community.mp3tag.de/u/newser)
#### Post date: [April 15, 2009, 11:46am UTC](https://community.mp3tag.de/t/formatting-date-entries/8243/2 "2009-04-15T11:46:58Z")

</div>

> [@Anthony Robertson](#):
>
> Is there a way of formatting these entries as 2009 April 14 ?

One day befor? sure?  
If you mean 2009 April 15 try this:

New action

Format value  
Field: COMMENT  
Format string:  
$replace(%comment%,$mid(%comment%,5,2),$if($eql($mid(%comment%,5,2),01), January ,$if($eql($mid(%comment%,5,2),02), February ,$if($eql($mid(%comment%,5,2),03), March ,$if($eql($mid(%comment%,5,2),04), April ,$if($eql($mid(%comment%,5,2),05), May ,$if($eql($mid(%comment%,5,2),06), June ,$if($eql($mid(%comment%,5,2),07), July ,$if($eql($mid(%comment%,5,2),08), August ,$if($eql($mid(%comment%,5,2),09), September ,$if($eql($mid(%comment%,5,2),10), October ,$if($eql($mid(%comment%,5,2),11), November ,$if($eql($mid(%comment%,5,2),12), December ,$mid(%comment%,5,2))))))))))))))

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [April 15, 2009, 12:55pm UTC](https://community.mp3tag.de/t/formatting-date-entries/8243/3 "2009-04-15T12:55:21Z")

</div>

> [@Anthony Robertson](#):
>
> ... 20090415 (representing 15 April 2009). Is there a way of formatting these entries as 2009 April 14 ? ...

Full names of the months (one line of code):

**$left(%COMMENT%,4)' ' $replace($mid(%COMMENT%,5,2), '01','January','02','February','03','March','04','April','05','May','06','June', '07','July','08','August','09','September','10','October','11','November','12','December') ' '$right(%COMMENT%,2)**

Abbreviated names of the months (one line of code):

**$left(%COMMENT%,4)' ' $replace($mid(%COMMENT%,5,2), '01','Jan','02','Feb','03','Mar','04','Apr','05','May','06','June', '07','July','08','Aug','09','Sept','10','Oct','11','Nov','12','Dec') ' '$right(%COMMENT%,2)**

Use formula within action:

_Actiontype 5:_ **Format tag field**  
_Field:_ **COMMENT**  
_Formatstring:_ **$left(%comment%,4)'÷'$replace($mid(%comment%,5,2),  
'01','January','02','February','03','March','04','April','05','May','06','June',  
'07','July','08','August','09','September','10','October','11','November','12','December')  
'÷'$right(%comment%,2)**

_Actiontype 5:_ **Format tag field**  
_Field:_ **COMMENT**  
_Formatstring:_ **$left(%comment%,4)'÷'$replace($mid(%comment%,5,2),  
'01','Jan','02','Feb','03','Mar','04','Apr','05','May','06','June',  
'07','July','08','Aug','09','Sept','10','Oct','11','Nov','12','Dec')  
'÷'$right(%comment%,2)**

_Note: Replace one special character ÷ with one space character._

If you want to subtract one day and have it formatted as two digits, then use this formula:

**$right('00'$sub($right(%COMMENT%,2),1),2)**

DD.20090415.1710.CEST

---

<div class="post-metadata">

### Author: ![tonyorob](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/c68b51/32.png) [@tonyorob](https://community.mp3tag.de/u/tonyorob)
#### Post date: [April 16, 2009, 1:48am UTC](https://community.mp3tag.de/t/formatting-date-entries/8243/4 "2009-04-16T01:48:30Z")

</div>

> [@newser](#):
>
> One day befor? sure?  
> If you mean 2009 April 15 try this:
> 
> New action
> 
> Format value  
> Field: COMMENT  
> Format string:
> 
> ```
> $replace(%comment%,$mid(%comment%,5,2),$if($eql($mid(%comment%,5,2),01), January ,$if($eql($mid(%comment%,5,2),02), February ,$if($eql($mid(%comment%,5,2),03), March ,$if($eql($mid(%comment%,5,2),04), April ,$if($eql($mid(%comment%,5,2),05), May ,$if($eql($mid(%comment%,5,2),06), June ,$if($eql($mid(%comment%,5,2),07), July ,$if($eql($mid(%comment%,5,2),08), August ,$if($eql($mid(%comment%,5,2),09), September ,$if($eql($mid(%comment%,5,2),10), October ,$if($eql($mid(%comment%,5,2),11), November ,$if($eql($mid(%comment%,5,2),12), December ,$mid(%comment%,5,2))))))))))))))
> 
> ```

Newser  
Thanks so much for your help. I did mean the same day, not the day before - sorry!  
The code string you sent me works well on most date numbers but where the year month or day have identical 2 figures the result shows an error. I quote some examples below.

20060607 = 20 June June 07 (06)  
20070729 = 20 July July 29 (07)  
20070909 = 2007 September September (09)  
20071111 = 2007 November November (11)  
20080824 = 20 August August 24 (08)

Othewise the code string works well. Perhaps you can modify this to correct the problem.

Thanks again

Anthony Robertson ![:rolleyes:](https://community.mp3tag.de/uploads/default/original/1X/3a79e8b0b7d169b30216785521d7c6f4f895c421.gif ":rolleyes:")

---

<div class="post-metadata">

### Author: ![newser](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/n/b9bd4f/32.png) [@newser](https://community.mp3tag.de/u/newser)
#### Post date: [April 16, 2009, 7:53am UTC](https://community.mp3tag.de/t/formatting-date-entries/8243/5 "2009-04-16T07:53:12Z")

</div>

At the moment i don't know why there's an error.  
But you can use DelevD's expert problem solving. It works perfect.

> [@DetlevD](#):
>
> Full names of the months (one line of code):  
> **$left(%comment%,4)' '$replace($mid(%comment%,5,2),'01','January','02','February','03','March','04','April','05','May','06','June','07','July','08','August','09','September','10','October','11','November','12','December')  
> ' '$right(%comment%,2)**

---

<div class="post-metadata">

### Author: ![tonyorob](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/c68b51/32.png) [@tonyorob](https://community.mp3tag.de/u/tonyorob)
#### Post date: [April 16, 2009, 8:46am UTC](https://community.mp3tag.de/t/formatting-date-entries/8243/6 "2009-04-16T08:46:54Z")

</div>

Thank you again to Newser and DetlevD for your input.  
I have used DetlevD's string and it works well with year and month, but does not include the day number.  
I have a friend who has also shown interest and he has given me this code-string which works well for year, month and day also.

$left(%comment%,4) $if($eql($mid(%comment%,5, 2),01),January,$if($eql($mid(%comment%,5,2),02),February,$if($eql($mid(%comment%,5,2),03),March,$if($eql($mid(%comment%,5,2),04),April,$if($eql($mid(%comment%,5,2),05),May,$if($eql($mid(%comment%,5,2),06),June,$if($eql($mid(%comment%,5,2),07),July,$if($eql($mid(%comment%,5,2),08),August,$if($eql($mid(%comment%,5,2),09),September,$if($eql($mid(%comment%,5,2),10),October,$if($eql($mid(%comment%,5,2),11),November,$if($eql($mid(%comment%,5,2),12),December,$mid(%comment%, 5, 2))))))))))))) $right(%comment%,2)

I think my problem is now solved.  
Thanks again  
Anthony Robertson ![:music:](https://community.mp3tag.de/uploads/default/original/1X/2ba05d1ade5eb0d15fc173be6f717dbe63890a70.gif ":music:")

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [April 16, 2009, 9:20am UTC](https://community.mp3tag.de/t/formatting-date-entries/8243/7 "2009-04-16T09:20:14Z")

</div>

> [@newser](#):
>
> ...  
> Format value  
> Field: COMMENT  
> Format string:
> 
> ```
> $replace(%comment%,$mid(%comment%,5,2),$if($eql($mid(%comment%,5,2),01), January ,$if($eql($mid(%comment%,5,2),02), February ,$if($eql($mid(%comment%,5,2),03), March ,$if($eql($mid(%comment%,5,2),04), April ,$if($eql($mid(%comment%,5,2),05), May ,$if($eql($mid(%comment%,5,2),06), June ,$if($eql($mid(%comment%,5,2),07), July ,$if($eql($mid(%comment%,5,2),08), August ,$if($eql($mid(%comment%,5,2),09), September ,$if($eql($mid(%comment%,5,2),10), October ,$if($eql($mid(%comment%,5,2),11), November ,$if($eql($mid(%comment%,5,2),12), December ,$mid(%comment%,5,2))))))))))))))
> 
> ```

Hi newser,  
the problem with this formula is, that it replaces **all** targets within the given input source string.  
Condensed example:

```
comment = '20080815'
$mid(%comment%,5,2) = '08'
$replace('20080815','08',' August ') ==> '20 August August 15'

```

DD.20090416.1320.CEST

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [April 16, 2009, 9:31am UTC](https://community.mp3tag.de/t/formatting-date-entries/8243/8 "2009-04-16T09:31:56Z")

</div>

> [@Anthony Robertson](#):
>
> Thank you again to Newser and DetlevD for your input.  
> I have used DetlevD's string and it works well with year and month, but does not include the day number. ...

There are many ways to Rome.  
Look again carefully ... my path also leads to a proper solution with smaller code.

> [@newser](#):
>
> ... But you can use DelevD's expert problem solving. It works perfect.

Hi, newser, thank you for verifying.

DD.20090416.1332.CEST

---

<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/formatting-date-entries/8243/9 "2026-02-09T12:21:29Z")

</div>


