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!

How do I convert minutes to days, hours, minutes 1

Status
Not open for further replies.
Jul 24, 2000
11
US
Hello,<br>does anyone know a formula that can take an integer field for minutes and convert that into days, hours, and minutes<br>i.e.&nbsp;&nbsp;4000 minutes = 2d, 18h, 40m<br><br>Thanks,<br>Oren
 
ToText({{Minutes}}\(24*60),0) + 'd, ' + <br>ToText((({Minutes}\60) Mod 24),0) + 'h, ' +<br>ToText(({Minutes} Mod 60),0) + 'm'<br>This works in v8 - previous versions require different operators other than mod and integer division (\)<br><br><br> <p>Malcolm Wynden<br><a href=mailto:wynden@island.dot.net>wynden@island.dot.net</a><br><a href= > </a><br>
 
Try Truncate ({Integer Value}/1440) to get the days. Similar formulas will work to get the hours and minutes.&nbsp;&nbsp;I use the following formula to convert a time field that is in decimal format (10.75 = 10:45) for display in Crystal.&nbsp;&nbsp;Hope this helps.<br><br>Jim<br><br>Time (Truncate ({JTIMD.JLADJE}),Round (60 * ({JTIMD.JLADJE} - Truncate ({JTIMD.JLADJE}))),0)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top