Time queston (hours and minutes)

  • Thread starter Thread starter youngnwithqs
  • Start date Start date
Y

youngnwithqs

I am trying to add up the total time a project should take, with all th
steps assigned a time (in minutes). When that step is checked (meani
it should be done) the time is added to a total box a the bottom. Is
way in access that i can convert this number (say 200) to hours an
minute (any way, 3.20 or 2 boxes, one hour and one minutes). Thanks

Jos
 
Is a
way in access that i can convert this number (say 200) to hours and
minute (any way, 3.20 or 2 boxes, one hour and one minutes). Thanks

Sure. Set the Control Source of a textbox to

=[duration] \ 60 & ":" & Format([Duration] MOD 60, "00")

to display 3:20.
 
Try a text box with ControlSource of:
=[Minutes] \ 60 & Format([Minutes] Mod 60, "\:00")
where "Minutes" is the name of the text box containing the number of
minutes.

This uses:
- integer division to get the number of whole hours;
- Mod to get the left over minutes;
- Format() to force 2-digit display of minutes, and add the literal colon.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
Back
Top