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

Converting hours to Days / hours / mins

Status
Not open for further replies.

BettsPaul

Technical User
Feb 23, 2004
1
GB
How can I display a number which I have in hours to display in Days Hours and possibly minutes
 
What format is your hours field in - number (35.75) or integer(36)?
 
Insert the formulas below...update the {Table.HOURS} field with your own {Table.Field}

Name : {@DAYS}
Formula : Int ({Table.HOURS}/24)


Name : {@HOURS}
Formula : Int ({Table.HOURS} - (Int ({Table.HOURS}/24) * 24))


Name : {@MINUTES}
Formula : ({Table.HOURS} - Int ({Table.HOURS})) * 60

It returns data as follows...

HOURS @DAYS @HOURS @MINUTES
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
36.00 1 12 0
35.75 1 11 45
77.50 3 5 30
48.00 2 0 0
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
I have a FAQ here that should help:

faq767-3543

The only significant difference being that you'd want to divide the hours by 24 to get the days.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top