If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do I show hours and minutes in a time card i.e.: 40:32 weekly
I am building a database for a trucking company, and when I use the Short
Time for the time card, it will not let me input anything over 23:59 and it does not add the weekly hours correctly. It must be on a 24 hour cycle: so, 22:30 plus 10:15 adds up to 8:45...... instead of 32:45 like it should. Any ideas? |
#2
|
|||
|
|||
How do I show hours and minutes in a time card i.e.: 40:32 weekly
Connie wrote:
I am building a database for a trucking company, and when I use the Short Time for the time card, it will not let me input anything over 23:59 and it does not add the weekly hours correctly. It must be on a 24 hour cycle: so, 22:30 plus 10:15 adds up to 8:45...... instead of 32:45 like it should. Any ideas? The DateTime DataType is for storing a "point in time" not an "amount of time". To store durations you should either store a StartTime and EndTime in separate fields or else store the number of (minutes, secods or hours) as a numeric value. -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com |
#3
|
|||
|
|||
How do I show hours and minutes in a time card i.e.: 40:32 weekly
You should store your values as long integer (or integer) values that
represent the total minutes for an entry. Then you can display the results the way you wish (using Format, calculations, etc.) based on the minutes, but your additions will properly add minutes and not "time". -- Ken Snell MS ACCESS MVP "Connie" wrote in message ... I am building a database for a trucking company, and when I use the Short Time for the time card, it will not let me input anything over 23:59 and it does not add the weekly hours correctly. It must be on a 24 hour cycle: so, 22:30 plus 10:15 adds up to 8:45...... instead of 32:45 like it should. Any ideas? |
#4
|
|||
|
|||
You can enter the time as text fields in the 12:45 format and build a query field that converts to minutes.
Set the Mask in the time field to 12:45 fromat. In the entry a person will have to only enter 4 numbers 1245 or 0345 eg. The query should be: SELECT Table6.timer, Val(Left([timer],InStr([timer],":")-1))*60+Val(Right([timer],InStr([timer],":")-1)) AS Timed FROM Table6; You can then add the column Timed and convert back to hh:mm format or not. Note: Never, never use Time as a field name If you want decimal hours then use: SELECT Table6.timer, Val(Left([timer],InStr([timer],":")-1))+Val(Right([timer],InStr([timer],":")-1))/60 AS Timed FROM Table6; Hope this helps, Bob Quote:
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convert minutes into hours and minutes | southtxxbox | Worksheet Functions | 6 | March 29th, 2008 09:16 AM |
Convert hours and minutes in time format into fractions of hours.. | Akern | Worksheet Functions | 4 | April 21st, 2005 02:56 PM |
Change a date time field display from hours to minutes | Geoff | Database Design | 1 | March 1st, 2005 12:30 AM |
Time - Hours and Minutes | Mark Zak | General Discussion | 4 | February 18th, 2005 01:51 AM |
Displaying a figure as days, hours and minutes | Arvi Laanemets | Worksheet Functions | 1 | January 16th, 2004 02:27 PM |