Time format - Millis to [HH:mm:ss] - [days + HH:mm:ss] - [HH:mm] - [mm:ss] etc

Here is an extension to format the time / duration (millis) in different ways:
→ [HH:mm:ss] → [days + HH:mm:ss], → [HH:mm] → [mm:ss] → [HH:mm:ss:S] → [HH:mm:ss:SS] → [HH:mm:ss:SSS] etc.

Version 1 (July 20, 2020):
TFormat.aix (5.5 KB)

Version 2 (Oct 20, 2021):
TFormat2.aix (5.7 KB)

New blocks

This is asked very often and always requires a lot of questions / answers and posts in the forum.
Hence this extension (some of it can also be implemented with the on-board methods):

Blocks

But I want to simplify it:

16 Likes

Thx a lot! After years finally a very simple way. Very helpful!

1 Like

A simple question:
Is what way is it different from Clock component? :thinking:

Look at my example blocks (the greyed out), then you will see it.

A simple answer:
It is not possible to correctly format the duration with the Clock component.

My DateTools extension solves this issue:

image

No, it’s not a problem to get the right values (for hours, min, sec), but it’s about formatting the duration correctly, e.g. in this format: [HH:mm:ss] → 01:00:00.

2 Likes

how to make this type of select list item index

image
You mean this?

ok thank you friend

1 Like

I added a new version of this extension:
TFormat2.aix (5.7 KB)

2 Likes

Thank you for your extension. This was something I needed.

1 Like

hi
is this extension with new version of sdk

the author of this extension left this community
the extension should be independant of SDK requirements…
what about trying if it still works… let us know whatr you find out…

alternatively just use the clock component… all functionality actually already is there…

Taifun

You can try the alternate too

Before that if you tell us what you want it will be easy to help ypu

i try it and it is still working , i got an error while compiling i thought this error due using extension which wasn’t upgraded to new version of sdk.
thanks

it is about how to calculate between two time and convert millisecont to minutes and hours

Try this one. No lib involved. Or default clock component can be used