How do I convert seconds to Minutes and hours ??

Get help using Construct 2

Post » Thu Aug 24, 2017 11:08 am

so for example the number of seconds is 160 it has to show 00:02:40. guys please help me achieve this . thanks a ton :D :D :roll:
B
5
S
1
Posts: 17
Reputation: 361

Post » Thu Aug 24, 2017 11:40 am

Try...

Set Text to zeropad(floor(t/3600),2)&":"&zeropad(floor(t/60%60),2)&":"&zeropad(floor(t%60),2)

...where t is your total seconds.
B
20
S
9
G
4
Posts: 473
Reputation: 4,260

Post » Fri Aug 25, 2017 6:15 am

Yup, works like wonders . you the man .
B
5
S
1
Posts: 17
Reputation: 361

Post » Fri Aug 25, 2017 8:43 am

I made a plugin for this plugin-tr-clockparser_t191667
ImageImageImage
B
27
S
16
G
82
Posts: 1,029
Reputation: 45,777


Return to How do I....?

Who is online

Users browsing this forum: koops and 14 guests