473,387 Members | 1,512 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,387 software developers and data experts.

Converting Minutes to hh:mm format


In a query I used the function datediff to calculate the number of
minutes between two time periods on a given day. This function returned
the number of minutes as a long integer data type. I then formatted the
summed number in my report footers using:

=Format(Int(Sum([Total Time])/60),"00") & ":" & Format(([Total Time]
Mod 60),"00")

This displayed my number in hh:mm format.

I tried using a similar format in the detail portion of my report.

=Format(Int([Total Time]/60),"00") & ":" & Format(([Total Time]
Mod 60),"00")

However, I receive an #error as the result in my report. Formatting the
field into "short time" returns 0:00. I believe that's because Access
converts the number into the entire date. For example, 205 minutes
equates to 7/23/00 12:00 am.

Thanks,

Any suggestions on how I can format the detail line of my report to
display the hh:mm format?

Thanks,

Renee
--
Posted via http://dbforums.com
Nov 12 '05 #1
1 18453

I found I missing a "(" in my formula.

=Format(Int(([Total Time])/60),"00") & ":" & Format(([Total Time]
Mod 60),"00")

Thanks for checking,
--
Posted via http://dbforums.com
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: D. Shane Fowlkes | last post by:
Here's a good one. I've been using an Excel spreadsheet for the past couple of years to calculate a file's Estimated Download Time based off of a solid 50kbs connection (dial up). This is for a...
6
by: Able | last post by:
Dear friends I need to format seconds as hh:mm:ss. I see a lot of coding transforming seconds to hh:mm:ss. Somebody know a short way? Regards Able
4
by: Rich | last post by:
Now.ToShortTimeString returns 9:13 PM. I would like to get this in miliatry time with seconds included 21:13:45 (or something like that - just military time with seconds). How can this be...
14
by: Michael Barrido | last post by:
I have this for example: Dim iSeconds as int32 = 3600 '3600 seconds is one hour How do i convert it to "01:00:00" ? Please help. Thanks in advance!
1
by: Jason Chan | last post by:
DateTime mydate = new DateTime(2006,1,1,0,0,0); string testStr = mydate.ToString("hh:mm:ss"); //return 12:00:00 mydate = new DateTime(2006,1,1,1,0,0) testStr = mydate.ToString("hh:mm:ss");...
5
nirmalsingh
by: nirmalsingh | last post by:
i am getting date format in string as 30-11-2006 05:59:44 PM . i want to convert in the format of yyyy-mm-dd hh:mm:ss to sore it in mysql database. Help me with sample coding plz..
15
by: Jay Tee | last post by:
Hi, I have some code that does, essentially, the following: - gather information on tens of thousands of items (in this case, jobs running on a compute cluster) - store the information as a...
1
by: Vishal Bhargava | last post by:
Is there an inbuilt library in Python which you can use to convert time in seconds to hh:mm:ss format? Thanks, Vishal
1
by: unknown66 | last post by:
hello, I have a time value in unix time that I would like to convert into a time format of hh:mm:ss:ms. For example, I have this number, 1172234138451, that I would like to be in the hh:mm:ss:ms...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.