Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

Convert minutes to hour and minute in MS Access 2000.

Question posted by: James P. (Guest) on November 13th, 2005 01:51 AM
Hello,

In my Access report, I have a minutes field in the detail line. How
do I convert that minute to hour and minute. The problem for me now
is if I take the minutes, say 75 divide by 60, it gives me 1.25; or
90/60 = 1.50. These are not what the user wants.

They want to have hour and minutes, say 75 minutes, needs to convert
to 1.15 (1 hour 15 minutes); or 90 minutes to 1.30, and so on.

Are there any easy way to do it? Thanks in advance,

James
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
Allen Browne's Avatar
Allen Browne
Guest
n/a Posts
November 13th, 2005
01:51 AM
#2

Re: Convert minutes to hour and minute in MS Access 2000.
Use Integer division to get the whole hours, and Mod to get the left over
minutes:
=[Minutes] \ 60 & Format([Minutes] Mod 60, "\:00")

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"James P." <hanoi_honai@yahoo.com> wrote in message
news:f49d1d72.0408172133.3f61f470@posting.google.c om...[color=blue]
> Hello,
>
> In my Access report, I have a minutes field in the detail line. How
> do I convert that minute to hour and minute. The problem for me now
> is if I take the minutes, say 75 divide by 60, it gives me 1.25; or
> 90/60 = 1.50. These are not what the user wants.
>
> They want to have hour and minutes, say 75 minutes, needs to convert
> to 1.15 (1 hour 15 minutes); or 90 minutes to 1.30, and so on.
>
> Are there any easy way to do it? Thanks in advance,
>
> James[/color]



James P.'s Avatar
James P.
Guest
n/a Posts
November 13th, 2005
01:52 AM
#3

Re: Convert minutes to hour and minute in MS Access 2000.
"Allen Browne" <AllenBrowne@SeeSig.Invalid> wrote in message news:<4122eb22$0$17534$5a62ac22@per-qv1-newsreader-01.iinet.net.au>...[color=blue]
> Use Integer division to get the whole hours, and Mod to get the left over
> minutes:
> =[Minutes] \ 60 & Format([Minutes] Mod 60, "\:00")
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "James P." <hanoi_honai@yahoo.com> wrote in message
> news:f49d1d72.0408172133.3f61f470@posting.google.c om...[color=green]
> > Hello,
> >
> > In my Access report, I have a minutes field in the detail line. How
> > do I convert that minute to hour and minute. The problem for me now
> > is if I take the minutes, say 75 divide by 60, it gives me 1.25; or
> > 90/60 = 1.50. These are not what the user wants.
> >
> > They want to have hour and minutes, say 75 minutes, needs to convert
> > to 1.15 (1 hour 15 minutes); or 90 minutes to 1.30, and so on.
> >
> > Are there any easy way to do it? Thanks in advance,
> >
> > James[/color][/color]

Thank you very much, Allen. It works like a champ!

James

 
Not the answer you were looking for? Post your question . . .
183,909 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors