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
19
S
8
G
3
Posts: 423
Reputation: 3,964

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
73
Posts: 974
Reputation: 41,157


Return to How do I....?

Who is online

Users browsing this forum: Unconnected and 23 guests