Calculation - integer to hours & minutes

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

Guest

I am working with Access 97 data. One field was used to enter an amount of
time in minutes using the number format. The number 15 was entered for 15
minutes. In totaling these figures, I would like to separate it by hours and
minutes. I currently sum and then divide by 60 for hours with a decimal. I
would rather see hours and minutes separated. For instance - the sum equals
105 minutes. My query shows 1.75 hours. I'd like to see 1 hour, 45 minutes.

Thanks in advance, Mary
 
I do not know if this is going to help, but I have the same problem in Excel
and I use the following function:

=ROUNDDOWN(A1/60,0) &":"&IF(LEN(MOD(A1,60))=1,"0"&MOD(A1,60),MOD(A1,60))

Luke
 
The following will display it as X:XX. You can modify it to display the way
you mention...


=[SomeFieldName]\60 & Format([SomeFieldName] Mod 60, "\:00")
 
Rick, thanks!
I modified it slightly to:
Worktime: [Time Spent]\60 & Format([Time Spent] Mod 60," 00") & " Minutes"
This displays 0 15 Minutes

Where would I insert the word "Hours" to display 0 Hours, 15 Minutes? I've
tried a couple of places - no luck - need your expertise!

Rick B said:
The following will display it as X:XX. You can modify it to display the way
you mention...


=[SomeFieldName]\60 & Format([SomeFieldName] Mod 60, "\:00")


--
Rick B



Mary said:
I am working with Access 97 data. One field was used to enter an amount of
time in minutes using the number format. The number 15 was entered for 15
minutes. In totaling these figures, I would like to separate it by hours and
minutes. I currently sum and then divide by 60 for hours with a decimal. I
would rather see hours and minutes separated. For instance - the sum equals
105 minutes. My query shows 1.75 hours. I'd like to see 1 hour, 45 minutes.

Thanks in advance, Mary
 
Worktime: [Time Spent]\60 & " Hours " & Format([Time Spent] Mod 60," 00") &
" Minutes"




Mary said:
Rick, thanks!
I modified it slightly to:
Worktime: [Time Spent]\60 & Format([Time Spent] Mod 60," 00") & " Minutes"
This displays 0 15 Minutes

Where would I insert the word "Hours" to display 0 Hours, 15 Minutes? I've
tried a couple of places - no luck - need your expertise!

Rick B said:
The following will display it as X:XX. You can modify it to display the way
you mention...


=[SomeFieldName]\60 & Format([SomeFieldName] Mod 60, "\:00")


--
Rick B



Mary said:
I am working with Access 97 data. One field was used to enter an
amount
of
time in minutes using the number format. The number 15 was entered for 15
minutes. In totaling these figures, I would like to separate it by
hours
and
minutes. I currently sum and then divide by 60 for hours with a
decimal.
I
would rather see hours and minutes separated. For instance - the sum equals
105 minutes. My query shows 1.75 hours. I'd like to see 1 hour, 45 minutes.

Thanks in advance, Mary
 
Thanks, that did the trick!

LGC said:
Worktime: [Time Spent]\60 & " Hours " & Format([Time Spent] Mod 60," 00") &
" Minutes"




Mary said:
Rick, thanks!
I modified it slightly to:
Worktime: [Time Spent]\60 & Format([Time Spent] Mod 60," 00") & " Minutes"
This displays 0 15 Minutes

Where would I insert the word "Hours" to display 0 Hours, 15 Minutes? I've
tried a couple of places - no luck - need your expertise!

Rick B said:
The following will display it as X:XX. You can modify it to display the way
you mention...


=[SomeFieldName]\60 & Format([SomeFieldName] Mod 60, "\:00")


--
Rick B



I am working with Access 97 data. One field was used to enter an amount
of
time in minutes using the number format. The number 15 was entered for 15
minutes. In totaling these figures, I would like to separate it by hours
and
minutes. I currently sum and then divide by 60 for hours with a decimal.
I
would rather see hours and minutes separated. For instance - the sum
equals
105 minutes. My query shows 1.75 hours. I'd like to see 1 hour, 45
minutes.

Thanks in advance, Mary
 
Back
Top