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!

Hours and minutes Calculations

Status
Not open for further replies.

cell0042

Programmer
Nov 5, 2002
16
US
I figured out how to do a difference in times and get it into this format hh:mm. But now my problem is when I want to add the total hours up for a week it will not let me. It will only allow me to go up to 24 hours. What could I do inorder to have a value of lets say like 40 hours and 35 minutes. Please Help
 
Are you storing your data in date fields? If so, you should know that EVERY value stored in a date field has both a time portion and a date portion, and it is impossible to change this.

If you are storing information about elapsed time, do not store that information in date fields, store it in numeric fields representing the smallest bit of time you'll be using (looks like minutes, in this case). Then you can use division to get to the format you need.

If you're storing start and finish times, then by all means use date fields, but include the date.

If you let us know what you're doing, we'll probably be able to come up with some easy ways of going about it.

Jeremy =============
Jeremy Wallace
AlphaBet City Dataworks

Take a look at the Developers' section of the site for some helpful fundamentals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top