Connecting Tech Pros Worldwide Help | Site Map

Convert minutes to hour and minute in MS Access 2000.

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 01:51 AM
James P.
Guest
 
Posts: n/a
Default Convert minutes to hour and minute in MS Access 2000.

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

  #2  
Old November 13th, 2005, 01:51 AM
Allen Browne
Guest
 
Posts: n/a
Default 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]


  #3  
Old November 13th, 2005, 01:52 AM
James P.
Guest
 
Posts: n/a
Default 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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.