# Change %\_length% to HH:mm:sec using 64bit MP3tag

**URL:** <https://community.mp3tag.de/t/change-length-to-hhsec-using-64bit-mp3tag/61371>\
**Category:** Support\
**Created:** [June 25, 2023, 6:06pm UTC](https://community.mp3tag.de/t/change-length-to-hhsec-using-64bit-mp3tag/61371 "2023-06-25T18:06:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xpac5896a](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/x/85f322/32.png) [@xpac5896a](https://community.mp3tag.de/u/xpac5896a)\
**Post date:** [June 25, 2023, 6:06pm UTC](https://community.mp3tag.de/t/change-length-to-hhsec-using-64bit-mp3tag/61371/1 "2023-06-25T18:06:30Z")

</div>

I know orienkino helped me in fixing this but apparently, I reverted to the 64bit Mp3Tag version and his resolution doesn't work in the 64bit version. When you download and install a new version of MP3tag, 32 or 64 bit, it does change your export string in MP3tag . I copied his resolution into the CSV string and when expressed in the CSV file, all you get is the expression no result. I wonder if anybody has resolved this problem for Excel? Below is a copy of the string I used to try to get the HH:mm:ss  
%year%;%title%;%artist%;%album%;%track%;%$ifgreater(%\_length\_seconds%,3600,%\_length%,00:%\_length%)%;%genere%;%comments%;

---

<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:** [June 25, 2023, 6:11pm UTC](https://community.mp3tag.de/t/change-length-to-hhsec-using-64bit-mp3tag/61371/2 "2023-06-25T18:11:35Z")

</div>

> [@xpac5896a](#):
>
> I reverted to the 64bit Mp3Tag version and his resolution doesn't work in the 64bit version.

THere are no differences in executing export scripts in the 32- or 64-bit version. They work both the same way with the same scripts.  
But if the displayed string

> [@xpac5896a](#):
>
> %year%;%title%;%artist%;%album%;%track%;%$ifgreater(%\_length\_seconds%,3600,%\_length%,00:%\_length%)%;%genere%;%comments%;

is an accurate copy of what you used, then I spot a stray % following the closing brackets:

> [@xpac5896a](#):
>
> \_length%)%

and a superfluous % in front of $ifgreater:

> [@xpac5896a](#):
>
> %$ifgreater(%\_length\_seconds%....

and a user-defined field

> [@xpac5896a](#):
>
> %genere%

The corrected string:  
`%year%;%title%;%artist%;%album%;%track%;$ifgreater(%_length_seconds%,3600,%_length%,00:%_length%);%genre%;%comments%;`  
works.

Edit: in the meantime (3.21b ff) there is a function $fmtduration() that would help:  
Instead of `$ifgreater(%_length_seconds%,3600,%_length%,00:%_length%)`  
use  
`$fmtduration(%_length_seconds%,s,1)`

---

<div class="post-metadata">

**Author:** ![xpac5896a](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/x/85f322/32.png) [@xpac5896a](https://community.mp3tag.de/u/xpac5896a)\
**Post date:** [June 27, 2023, 4:49pm UTC](https://community.mp3tag.de/t/change-length-to-hhsec-using-64bit-mp3tag/61371/4 "2023-06-27T16:49:12Z")

</div>

ohrenkino: Thank you so much for pointing out that stray % at the end. I knew that it worked, just couldn't figure out why it didn't this time. It's odd that I saved a copy of the file but for some reason I just couldn't find it. This time I'm put it where it won't get lost. Thanks again/

---

<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:** [July 27, 2023, 4:49pm UTC](https://community.mp3tag.de/t/change-length-to-hhsec-using-64bit-mp3tag/61371/5 "2023-07-27T16:49:42Z")

</div>

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