Convert Minutes to Hours:Minutes

B

Berny

Can anyone please point me in the right direction

I have a running total of Minutes in a report and would like to display it
at the end in the following format:

HH:MM

I'm using the following:

=Sum([LogTime])/60

But the answer has the correct hours but not the minutes

any help is appreciated
 
O

OfficeDev18 via AccessMonster.com

Berny,

Divide the number of minutes by (24 hours X 60 minutes). (1440). Then format
the result as hours and minutes. Eg. For 15 minutes in a double numeric
variable called XMin, use

DisplayField = Format(XMin / 1440, "hh:nn")

Don't use "mm" but "nn". "mm" means 'months' to Access' Format() function.
You might look it up in the help file. Make sure to read the examples there.

Hope this helps,

Sam
Can anyone please point me in the right direction

I have a running total of Minutes in a report and would like to display it
at the end in the following format:

HH:MM

I'm using the following:

=Sum([LogTime])/60

But the answer has the correct hours but not the minutes

any help is appreciated
 
M

Marshall Barton

Berny said:
Can anyone please point me in the right direction

I have a running total of Minutes in a report and would like to display it
at the end in the following format:

HH:MM

I'm using the following:

=Sum([LogTime])/60


=Sum(LogTime) \ 60 & ":" & Format(Sum(LogTime) Mod 60, "00")
 
O

Ofer Cohen

Hi Sam
I like that idea, but the problem with it, that it will work only up to 24
hours

--
Good Luck
BS"D


OfficeDev18 via AccessMonster.com said:
Berny,

Divide the number of minutes by (24 hours X 60 minutes). (1440). Then format
the result as hours and minutes. Eg. For 15 minutes in a double numeric
variable called XMin, use

DisplayField = Format(XMin / 1440, "hh:nn")

Don't use "mm" but "nn". "mm" means 'months' to Access' Format() function.
You might look it up in the help file. Make sure to read the examples there.

Hope this helps,

Sam
Can anyone please point me in the right direction

I have a running total of Minutes in a report and would like to display it
at the end in the following format:

HH:MM

I'm using the following:

=Sum([LogTime])/60

But the answer has the correct hours but not the minutes

any help is appreciated
 
B

Berny

Thank you,

That did the trick!!!!

Marshall Barton said:
Berny said:
Can anyone please point me in the right direction

I have a running total of Minutes in a report and would like to display it
at the end in the following format:

HH:MM

I'm using the following:

=Sum([LogTime])/60


=Sum(LogTime) \ 60 & ":" & Format(Sum(LogTime) Mod 60, "00")
 
B

Berny

Thank you

OfficeDev18 via AccessMonster.com said:
Berny,

Divide the number of minutes by (24 hours X 60 minutes). (1440). Then
format
the result as hours and minutes. Eg. For 15 minutes in a double numeric
variable called XMin, use

DisplayField = Format(XMin / 1440, "hh:nn")

Don't use "mm" but "nn". "mm" means 'months' to Access' Format() function.
You might look it up in the help file. Make sure to read the examples
there.

Hope this helps,

Sam
Can anyone please point me in the right direction

I have a running total of Minutes in a report and would like to display it
at the end in the following format:

HH:MM

I'm using the following:

=Sum([LogTime])/60

But the answer has the correct hours but not the minutes

any help is appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top