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

seconds to military time??

Status
Not open for further replies.

PQTIII

IS-IT--Management
Sep 21, 2004
110
In my TABLE I have a field(starttime) that is seconds into the shift. We have two shifts. The first one starts at 07:10:00. The second starts at 19:10:00. How can I convert (starttime) to a 24 hour time?

Thanks Paul
 
Assuming you have a field that identifies the shift, you could create a formula {@dayseconds}:

if {table.shift} = "1" then 25800 + {table.starttime} else
if {table.shift} = "2" then 69000 + {table.starttime}

Then use SynapseVampire's FAQ formula to convert the seconds into a string displaying the time as hh:mm:ss. Go to faq767-3543 and set diff := {@dayseconds}. You can change the variable name (diff) to something else that makes sense in your case, if you wish.

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top