Division remainder in own column

G

Gary

Hi group. I am working on a report project and I need some assistance.
In my report I get data from the table that is the total number of minutes
that a person has been connected. Example the number could be anywhere betwee
1 minute up. So the data might look like 77 minutes for a specific connection
on a specific data. What I need is the remainder of this equation 77/60 in a
field. I can get the number of hours which in this case would be 1 bu the
remaining minutes need to be in another column like this 17.
I have looked at the MOD function but can't seem to get it to produce my
desired results.
Thanks in advance.
Gary
 
F

Fons Ponsioen

How about in the hour textbox:
=Int(NbrMinutes/60)
and in the remainder textbox:
=NbrMinutes-(Int(NbrMinutes/60)*60)
Hope this helps
Fons
 
G

Gary

Duane, thank you that is exactly what I was looking for.
I now have another related question.
In my hours column I divide the total number of minutes by 60 and if the
total number of minutes = 45 I still get the number 1 in the hours column. I
am guessing this is a formating issue, but I have tried fiexed and general
number formating with out any luck. Can you suggest a better solution.
Thanks
Gary

Duane Hookom said:
Try:
RemainderMinutes: [NumOfMinutes] Mod 60

--
Duane Hookom
MS Access MVP
--

Gary said:
Hi group. I am working on a report project and I need some assistance.
In my report I get data from the table that is the total number of minutes
that a person has been connected. Example the number could be anywhere betwee
1 minute up. So the data might look like 77 minutes for a specific connection
on a specific data. What I need is the remainder of this equation 77/60 in a
field. I can get the number of hours which in this case would be 1 bu the
remaining minutes need to be in another column like this 17.
I have looked at the MOD function but can't seem to get it to produce my
desired results.
Thanks in advance.
Gary
 
D

Duane Hookom

You can use integer divide
[NumberOfMinutes]\60

--
Duane Hookom
MS Access MVP


Gary said:
Duane, thank you that is exactly what I was looking for.
I now have another related question.
In my hours column I divide the total number of minutes by 60 and if the
total number of minutes = 45 I still get the number 1 in the hours column. I
am guessing this is a formating issue, but I have tried fiexed and general
number formating with out any luck. Can you suggest a better solution.
Thanks
Gary

Duane Hookom said:
Try:
RemainderMinutes: [NumOfMinutes] Mod 60

--
Duane Hookom
MS Access MVP
--

Gary said:
Hi group. I am working on a report project and I need some assistance.
In my report I get data from the table that is the total number of minutes
that a person has been connected. Example the number could be anywhere betwee
1 minute up. So the data might look like 77 minutes for a specific connection
on a specific data. What I need is the remainder of this equation
77/60 in
a
field. I can get the number of hours which in this case would be 1 bu the
remaining minutes need to be in another column like this 17.
I have looked at the MOD function but can't seem to get it to produce my
desired results.
Thanks in advance.
Gary
 
Top