By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,148 Members | 774 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,148 IT Pros & Developers. It's quick & easy.

converting minutes to DAYS /HOURS/ MINUTES -

P: n/a
i have TIME WORKED stored as minutes - I'd like to convert this to
days,hours,minutes.

I'm currently converting to hours and minutes but have not had
success adding the days portion to the formula below.

Any direction is greatly appreciated.

thanks
Format([TIME]\60,"0\:") & Format([TIME] Mod 60,"00")

Aug 21 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In article <11**********************@q3g2000prf.googlegroups. com>,
ma****@yahoo.com says...
i have TIME WORKED stored as minutes - I'd like to convert this to
days,hours,minutes.

I'm currently converting to hours and minutes but have not had
success adding the days portion to the formula below.

Any direction is greatly appreciated.

thanks
Format([TIME]\60,"0\:") & Format([TIME] Mod 60,"00")

one way:

(CSTR( [Minutes Worked]\60) + ":" +RIGHT("0"+ CSTR( [Minutes Worked] Mod 60),2)
) AS [Hours worked]
Aug 21 '07 #2

P: n/a
mar10 <ma****@yahoo.comwrote in news:1187694763.941215.177040
@q3g2000prf.googlegroups.com:
i have TIME WORKED stored as minutes - I'd like to convert this to
days,hours,minutes.

I'm currently converting to hours and minutes but have not had
success adding the days portion to the formula below.

Any direction is greatly appreciated.

thanks
Format([TIME]\60,"0\:") & Format([TIME] Mod 60,"00")
Public Function Minutes2Duration(minutes as long) as string
Dim dd as integer, hh as integer, mm as integer

dd = minutes \ 1440
minutes = minutes - dd*1440
hh = minutes \ 60
mm = minutes mod 60
Minutes2Duration = format(dd,"000")&":" _
& format(hh,"00")&":" & format(mm, "00")
end function
--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Aug 21 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.