minutes to hr:min format

T

T.Yaya

Hello. I've read several posts regarding this issue, but have not been able
for find the solution.

A vendor gave me this equation to determine total minues, based on military
time.

TOTMIN:
IIf(Int([proc_end])>Int([proc_start]),((Int([proc_end]/100)*60)+([proc_end]
Mod 100))-((Int([proc_start]/100)*60)+([proc_start] Mod
100)),1440-((Int([proc_start]/100)*60)+([proc_start] Mod
100))+((Int([proc_end]/100)*60)+([proc_end] Mod 100)))

I now need to display this is an hr:min format.

Another post suggested:
HrMin: [TotMin]\60 & Format([TotMin] Mod 60,":""00""")

However, this does not return the minutes, simply 00.

Any other ideas?
 
T

T.Yaya

Wow! thanks!
Secondary question? Where would I find more info on the Mod function?


Douglas J. Steele said:
HrMin: [TotMin]\60 & Format([TotMin] Mod 60,"\:00")


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


T.Yaya said:
Hello. I've read several posts regarding this issue, but have not been
able
for find the solution.

A vendor gave me this equation to determine total minues, based on
military
time.

TOTMIN:
IIf(Int([proc_end])>Int([proc_start]),((Int([proc_end]/100)*60)+([proc_end]
Mod 100))-((Int([proc_start]/100)*60)+([proc_start] Mod
100)),1440-((Int([proc_start]/100)*60)+([proc_start] Mod
100))+((Int([proc_end]/100)*60)+([proc_end] Mod 100)))

I now need to display this is an hr:min format.

Another post suggested:
HrMin: [TotMin]\60 & Format([TotMin] Mod 60,":""00""")

However, this does not return the minutes, simply 00.

Any other ideas?
 
J

John W. Vinson

Wow! thanks!
Secondary question? Where would I find more info on the Mod function?

Open the VBA editor (type Ctrl-G for example) and select Help, and search for
MOD. I don't think it's in the basic Access help but it's certainly in the VBA
help file.

John W. Vinson [MVP]
 

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