How do I Convert a string into time.

Get help using Construct 2

Post » Sat Mar 21, 2015 6:45 am

How do i convert a string like 4:00 into time like 240 secs and back.

I'm trying to set a par time for the a course and delete the total time spent completing the course and then displaying the difference.
B
5
Posts: 12
Reputation: 249

Post » Sat Mar 21, 2015 1:36 pm

depends on whether you have always the same format or if your system has to work with different formats

if its always mm:ss, you could for example just calculate
int(tokenat("4:00", 0, ":"))*60+int(tokenat("4:00", 1, ":"))
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
20
S
9
G
1
Posts: 786
Reputation: 3,729

Post » Fri Jan 15, 2016 3:03 am

thx.

Sry for the late responce I figured it out another way and for got about the post.

thx again though.
B
5
Posts: 12
Reputation: 249


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 1 guest