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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

converting 2 fields to time

Status
Not open for further replies.

MrHelpMe

Technical User
May 1, 2001
203
CA
Hello,

I have 2 fields. One called actual time that shows number of hours ie. 152. Also have another field that shows seconds. ie. 125. What I need to do is create a formula that converts both these fields combined to hours and minutes. ie. 11.52 . Any idea how to do this. Your help is appreciated. Thanks.
 
Your example doesn't make sense, but try this:

(You don't need to worry over the hours as you're not interested in converting hours to days.)

totext({table.hours},0,"")+"."+totext(int({table.seconds}/60),0,"")

If you need a value, use:

val(totext({table.hours},0,"")+"."+totext(int({table.seconds}/60),0,""))


-k
 
Actually synapsevampire,

this is really good except how would I show ie 407 to look like 00:04:07. Is there anyway to do this. Thanks again for your quick reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top