# formatting custom tags

**URL:** https://community.mp3tag.de/t/formatting-custom-tags/16162
**Category:** Support
**Created:** [September 20, 2014, 4:33pm UTC](https://community.mp3tag.de/t/formatting-custom-tags/16162 "2014-09-20T16:33:47Z")
**Posts on this page:** 1
**Showing post:** 9

<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: [September 21, 2014, 6:28am UTC](https://community.mp3tag.de/t/formatting-custom-tags/16162/9 "2014-09-21T06:28:26Z")

</div>

> [@jaketh](#):
>
> ... I'm using Guess Values "%\_file\_create\_date%": %month\_added%/%day\_added%/%year\_added% to create tags for each value so I can sort down quickly by year or month. ... I tried using a few functions to achieve the reformat and force leading zeros on month and day ... could anyone point me in the right direction?

Mp3tag offers different ways to reach the goal. Here is one.  
For a given DateTime string, in the following example, having international ISO 8601 format, it is rather easy to split the string into each subvalue into a Mp3tag variable.

For example ...

**Action "Format value" Field: TMP\_DT\_CREATED Formatstring: $replace(%\_file\_create\_datetime%,'-','\\\\',' ','\\\\',':','\\\\') ... gives ... TMP\_DT\_CREATED(0)..TMP\_DT\_CREATED(5)****%\_file\_create\_datetime% is '2014-09-21 12:34:56' $meta(TMP\_DT\_CREATED,0) is '2014' $meta(TMP\_DT\_CREATED,1) is '09' $meta(TMP\_DT\_CREATED,2) is '21' $meta(TMP\_DT\_CREATED,3) is '12' $meta(TMP\_DT\_CREATED,4) is '34' $meta(TMP\_DT\_CREATED,5) is '56'**

If your computer DateTime setting differs from the international standard, then you have to adapt the proposal to your needs.

See also ...  
[Turn D/M/YYYY into YYYY/MM/DD](https://community.mp3tag.de/t/9074/9)

DD.20140921.1056.CEST

---

_[View the full topic](https://community.mp3tag.de/t/formatting-custom-tags/16162)._
