Convert from time (seconds) to 'yyyy/MMdd-hh:mm:ss' => [ No leading zeros ]

Hi there,

I've making several experiments with the functions available on the CLOCK component, howver I could not find anything to make the above conversion.

I mean that, for example the number '180' should be translated into the string '3:00', the number '3600' translated into '1:00:00', and so on.

As can be seen, left zeros are ommited with this rule.

With the whole available function set on the CLOCK I could even do that, but I would spent a lot of time an immense number of blocks; if there is no other way, ok, I do that, but I was wondering if isnt there a 'smarter' way.

Could someone give insights on that?

Thanks

1 Like

This procedure will handle up to 86399 seconds before it rolls over

image

image

A multi-day countdown:

Basically, you have to chomp off chunks of time in descending order of magnitude.
ByeByeAI.aia (3.1 KB)

Since the lag sometimes can reach of days ( e.g during weekend, when there is no one there to restart the server ) I will try the above extension.

I really appreciate all inputs.

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