# Length (time display) with 3 decimal places

**URL:** <https://community.mp3tag.de/t/length-time-display-with-3-decimal-places/41619>\
**Category:** Support\
**Created:** [May 5, 2018, 6:13pm UTC](https://community.mp3tag.de/t/length-time-display-with-3-decimal-places/41619 "2018-05-05T18:13:10Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![On-line](https://community.mp3tag.de/user_avatar/community.mp3tag.de/on-line/32/5177_2.png) [@On-line](https://community.mp3tag.de/u/On-line)\
**Post date:** [May 5, 2018, 6:13pm UTC](https://community.mp3tag.de/t/length-time-display-with-3-decimal-places/41619/1 "2018-05-05T18:13:10Z")

</div>

I would like the length (time) column to display as MM:SS.xxx, with three decimal places displayed. I have tried using %length% and functions like div(x,y), but can't seem to get the syntax correct. Any suggestions?

---

<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:** [May 5, 2018, 6:50pm UTC](https://community.mp3tag.de/t/length-time-display-with-3-decimal-places/41619/2 "2018-05-05T18:50:39Z")

</div>

Which field would show you the fractions of a second?  
The only ones I found are %\_length% and %\_length\_seconds%.  
To get the length out of the last field:  
$div(%\_length\_seconds%,60):$mod(%\_length\_seconds%,60)

---

<div class="post-metadata">

**Author:** ![On-line](https://community.mp3tag.de/user_avatar/community.mp3tag.de/on-line/32/5177_2.png) [@On-line](https://community.mp3tag.de/u/On-line)\
**Post date:** [May 5, 2018, 8:16pm UTC](https://community.mp3tag.de/t/length-time-display-with-3-decimal-places/41619/3 "2018-05-05T20:16:11Z")

</div>

Thanks, ohrenkino. That helped a lot!

Here's what is 'working' so far:

$div($mod(%length%,6000000),60000):$div($mod(%length%,60000),1000).$mod(%length%,1000)

The only problem is that a time of something like 4:03.291 displays as 4:3.291.

Is there a simple way of forcing the zero in 03 seconds?

---

<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:** [May 5, 2018, 8:18pm UTC](https://community.mp3tag.de/t/length-time-display-with-3-decimal-places/41619/4 "2018-05-05T20:18:34Z")

</div>

$div($mod(%length%,6000000),60000):$num($div($mod(%length%,60000),1000),2).$mod(%length%,1000)  
or e.g.  
$div($mod(%length%,6000000),60000):$num($div($mod(%length%,60000),1000),2).$num($mod(%length%,1000),3)

---

<div class="post-metadata">

**Author:** ![On-line](https://community.mp3tag.de/user_avatar/community.mp3tag.de/on-line/32/5177_2.png) [@On-line](https://community.mp3tag.de/u/On-line)\
**Post date:** [May 5, 2018, 8:21pm UTC](https://community.mp3tag.de/t/length-time-display-with-3-decimal-places/41619/5 "2018-05-05T20:21:42Z")

</div>

Very, very nice! Thanks a million!

You may have noticed that I didn't account for track lengths of 1 hour or more.

I doubt that I even have any, so I'm not too worried about it.

Thanks again, and enjoy the rest of the weekend!

---

<div class="post-metadata">

**Author:** ![On-line](https://community.mp3tag.de/user_avatar/community.mp3tag.de/on-line/32/5177_2.png) [@On-line](https://community.mp3tag.de/u/On-line)\
**Post date:** [May 7, 2018, 12:46am UTC](https://community.mp3tag.de/t/length-time-display-with-3-decimal-places/41619/6 "2018-05-07T00:46:24Z")

</div>

This is strange.

I only tested this for mp3 files, and it was fine.

For FLAC files (which is what I use the most), I get all files with a time of 0:00.000.

???

---

<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:** [May 7, 2018, 4:54am UTC](https://community.mp3tag.de/t/length-time-display-with-3-decimal-places/41619/7 "2018-05-07T04:54:31Z")

</div>

Try  
%\_length%  
instead of  
%length%

---

<div class="post-metadata">

**Author:** ![On-line](https://community.mp3tag.de/user_avatar/community.mp3tag.de/on-line/32/5177_2.png) [@On-line](https://community.mp3tag.de/u/On-line)\
**Post date:** [May 7, 2018, 1:24pm UTC](https://community.mp3tag.de/t/length-time-display-with-3-decimal-places/41619/8 "2018-05-07T13:24:52Z")

</div>

Thanks for your reply.

When using:  
$div($mod(%\_length%,6000000),60000):$num($div($mod(%\_length%,60000),1000),2).$num($mod(%\_length%,1000),3)

I get 0:00.004 for a song that should be 4:03.291.

This result is for both mp3 and FLAC.

Also, if I use %\_length\_seconds% only, I get the number of seconds rounded to the nearest second. So %\_length\_seconds% won't give me fractions (decimals) of a second.

---

<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:** [May 7, 2018, 5:26pm UTC](https://community.mp3tag.de/t/length-time-display-with-3-decimal-places/41619/9 "2018-05-07T17:26:08Z")

</div>

> [@On-line](#):
>
> won't give me fractions (decimals) of a second

That is why I asked

> [@ohrenkino](#):
>
> Which field would show you the fractions of a second?

See e.g. the help on variables with technical information:

> **[Format Strings and Placeholders – Mp3tag Documentation](https://docs.mp3tag.de/format/)**
>
> Documentation on format strings and placeholders to describe the structure of file names and imported data. Mp3tag is the universal Tag Editor.

I think that %length% was a user-defined field, inserted by the converter. An apparently the converter for flac does not add this field.

---

<div class="post-metadata">

**Author:** ![On-line](https://community.mp3tag.de/user_avatar/community.mp3tag.de/on-line/32/5177_2.png) [@On-line](https://community.mp3tag.de/u/On-line)\
**Post date:** [May 7, 2018, 6:04pm UTC](https://community.mp3tag.de/t/length-time-display-with-3-decimal-places/41619/10 "2018-05-07T18:04:07Z")

</div>

Yes, I had already been looking at that page you linked to.

I'm wondering if I could use the bit rate somehow. Take the file size (in kB) and divide it by the bit rate (in kB/s), to generate the time in seconds.

I'll have to experiement some more.

Thanks for your input.

---

<div class="post-metadata">

**Author:** ![On-line](https://community.mp3tag.de/user_avatar/community.mp3tag.de/on-line/32/5177_2.png) [@On-line](https://community.mp3tag.de/u/On-line)\
**Post date:** [May 11, 2018, 2:43pm UTC](https://community.mp3tag.de/t/length-time-display-with-3-decimal-places/41619/11 "2018-05-11T14:43:03Z")

</div>

I was wondering if there might be something I could add to Options --\> Tags --\> Mapping that would work for FLAC files to extract the length (time).

Anyone know?

---

<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:27pm UTC](https://community.mp3tag.de/t/length-time-display-with-3-decimal-places/41619/12 "2026-02-09T12:27:25Z")

</div>


