Converting Minutes to hours

Breanna

Registered User.
Local time
Yesterday, 20:00
Joined
Dec 29, 2014
Messages
49
I have a query that uses DateDiff to give me Minutes of an in and out time

Online I found the following to use in a textbox control source on a report to convert the minutes to Hours:Minutes.

=[Minutes] \ 60 & Format([Minutes] Mod 60, "\:00")

But when I enter this it gives me an error. I am not sure how to fix it.
I tried writing it like this with RegHours being the source of that column

=[RegHours]\60& Format([RegHours] mod 60, "\:00")

but when I go back to report view that text box then says #Type!

I feel like this should be an easy fix I am overlooking. Anyone know what I am doing wrong?
 
I have a query that uses DateDiff to give me Minutes of an in and out time

Online I found the following to use in a textbox control source on a report to convert the minutes to Hours:Minutes.

=[Minutes] \ 60 & Format([Minutes] Mod 60, "\:00")

But when I enter this it gives me an error. I am not sure how to fix it.
I tried writing it like this with RegHours being the source of that column

=[RegHours]\60& Format([RegHours] mod 60, "\:00")

but when I go back to report view that text box then says #Type!

I feel like this should be an easy fix I am overlooking. Anyone know what I am doing wrong?

This is straight from my immediate window.

Code:
iMin = 181
? str(int(imin/60))& ":" format(imin mod 60,"00")
 3:01
This can probably be shortened but at least it's a starting point.
 

Users who are viewing this thread

Back
Top Bottom