473,386 Members | 1,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

converting minutes to DAYS /HOURS/ MINUTES -

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
2 12244
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Deepa | last post by:
I need a routine to convert milliseconds to a traditional dd:hh:mm:ss or four separate variables that I can display. I am not wanting to display a date but rather the interval between two...
7
by: Stu | last post by:
Is there a simple function call within "C" that I can use to convert number of seconds (keep in mind this may be a type longlong and has to work on UNIX and NT) into Days, months, Hours, Minutes...
2
by: J M | last post by:
I rebooted a network device just few minutes ago and getting device-up-time value 3191. How do I convert a time elapsed in days hours minutes and seconds for above value? Example: This device...
3
by: Bartb | last post by:
Hi All My first posting. I have three fields in an access database that are seconds,minutes and hours.These are just numbers and have no time values.I need to be able to convert these fields into...
1
by: markdp | last post by:
I'm trying to write a program that takes a user inputted number of seconds and converts it into hours, minutes and seconds. So for instance, the program prompts the user for seconds, lets say 1000...
1
by: baneaic | last post by:
I'm trying to create a form that will allow a user to enter certain job specifications (# of pages and # of copies) and then have a field that will automatically calculate how long that job will...
3
by: Bert Murphy | last post by:
Im trying to write code that would have seconds for the input,convert the seconds to the hours:minutes:seconds,accumulate the hours:minutes:seconds to a maximum of 999Hours:59Minutes:59Seconds as...
5
by: =?Utf-8?B?U2hlbGRvbg==?= | last post by:
Hello - I have about ten integer values that each need to be converted to days, hours, minutes and seconds. I can't seem to find a formula for same that works. These integer values come from a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.