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
6
S
1
Posts: 18
Reputation: 388

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
22
S
9
G
4
Posts: 482
Reputation: 4,346

Post » Fri Aug 25, 2017 6:15 am

Yup, works like wonders . you the man .
B
6
S
1
Posts: 18
Reputation: 388

Post » Fri Aug 25, 2017 8:43 am

I made a plugin for this plugin-tr-clockparser_t191667
ImageImageImage
B
35
S
20
G
85
Posts: 1,056
Reputation: 47,996


Return to How do I....?

Who is online

Users browsing this forum: COGames, legofreak689 and 25 guests