Access: Display hour values greater than 24

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a project which requires times to be shown as hours and
minutes only rather than days, hours and minutes e.g. 36:15 for 36 hours and
15 minutes. I cannot seem to find a format which will display a time over 24
hours. I am using Access 2002.
 
Stivvy,

No, you won't be able to do this with a Date/Time data type. I assume
this is data which is entered and stored, as against data which is
calculated and displayed. If so, I would suggest two separate fields,
Number data type, one for hours nd one for minutes. From the data entry
point of view on the form, you can put them alongside each other and it
should work out pretty well. If you need to do any totalling or
calculations based on this data, it will probably be pretty simple.
 
Hate to disagree, Steve, but he can do it with a Date/Time field: he just
shouldn't. <g>

Stivvy: The reasons why you shouldn't is that Date/Time fields are intended
to be used for timestamps (i.e.: date and time), not for durations. Steve's
suggestion is definitely recommended (although to be honest, I would simply
use 1 field, Minutes, and store 36:15 as 2175 (36 * 60 + 15)) If, however,
you cannot make changes at this time, take a look at what I wrote in my
October, 2003 Access Answers column in Pinnacle Publication's Smart Access.
You can download the column (and its accompanying sample database) for free
at http://www.accessmvp.com/djsteele/SmartAccess.html
 
Hi Stivvy

I have had this problem and soved it with:
I made a firld for 'Total minutes on Job' but didn't display it.
I then created this field expression:
Actual Time on Job: Int([total minutes on job]/60) & " " & (Format([Total
Minutes on Job]/1440,":n"))

It gives you a format of hours:minutes and will go over 24 hours.
e.g 36 hours 15 mins will be 36:15

Hope this helps
EliotF
 
Back
Top