Joined: 06 Nov 2010 Posts: 22 Location: montreal qc
Convert minutes in hours
Posted: Tue Nov 16, 2010 6:17 am
Hi there i need your help..!!!
i built a counter 6 digit the fist 4 digit is hour the last 2 one is minute
0000:00
i have two variable add together to add time in the counter...prob is if i have like 58 minutes and want to add 3 minutes the result on display is 0000:61
i want to convert this in hour...0001:01
i tried:
Code:
if (minutes == 60)
{
hours++; x1 = 1;
}
60 work!!!
61 or more dont work (past true) i've tried > or >= instead of ==
same prob...
and if i have 55 minutes and i want to add 20 make 75...should be
0001:15
Thanks for help!!!!!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum