Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting Minutes to Hours & Minutes

Status
Not open for further replies.

primagic

IS-IT--Management
Jul 24, 2008
476
GB
I have a pdf form where the user enters hours and minutes for each day of the week.

So in one column they enter the hours - eg. 4 hours
In the other column they enter the mins - 40 minutes

I have another field which converts the 4 hours to minutes (4*60)

so I get a total mins (for the hours). I then add the minutes column and the mins (from the hours) to give me a total overall mintues eg. 500 minutes

How can I convert (in another textbox) the 500 minutes to hours and minutes. I tried divide by 60 but it gives me 8.3333.

Please help

Thanks
Andrew
 
Take the initeger value of the division as your hours, then use
Code:
hours [b]%[/b] 60
to get the minutes.

The % operator gives you the remainder of a modulo division.

;-)

You could of course also just take the values of the separate text boxes, couldn't you?

Cheers,
MakeItSo

“Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family.” (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top