473,503 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

integer to time conversion off ?

2 New Member
I have a report that needs to track the total time spent on a project daily. I have converted the hours to minutes, and am using the Format([min] Mod, "\:00") to convert them to hours & minutes. One person has 360 min +420+420+450+270 = 1920 total minutes which divided by 60 = 32 hours --- the report shows a subtotal of 32.30 hours?? There are no extra decimal points in the integer it is set at 2 and only 2 can be entered. the 2 people on the report with a single entry roll up exactly. one has a total of 78 min which rounds up properly to 1:18 I am completely lost as to why the other one is so off?
Jul 14 '20 #1
5 2149
strive4peace
39 Recognized Expert New Member
hi @Aryzona

this is missing the second parameter for the MOD operator:

[min] Mod ??

perhaps you meant to put 60 there? that will give only minutes left

Hours would be:
[min]\60

perhaps you want:
Expand|Select|Wrap|Line Numbers
  1. Format( [min]\60, "0" ) 
  2. & ":" 
  3. & Format( [min] Mod 60, "00" )
  4.  
?
Jul 14 '20 #2
Aryzona
2 New Member
yes .. i missed typing the 60 ...

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

is what i actually have.
Jul 14 '20 #3
strive4peace
39 Recognized Expert New Member
missed your equation ... skip this
Jul 14 '20 #4
strive4peace
39 Recognized Expert New Member
I see the problem!!!
Jul 14 '20 #5
strive4peace
39 Recognized Expert New Member
you need to wrap both parts with SUM

=Sum([tmin])\60 & Format( Sum([tmin]) Mod 60,"\:00")
Jul 14 '20 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

11
2507
by: Faheem Mitha | last post by:
Hi, I'm not sure what would be more appropriate, so I'm ccing it to both alt.comp.lang.learn.c-c++ and comp.lang.python, with followup to alt.comp.lang.learn.c-c++. While working with a...
9
3928
by: Andrew | last post by:
Hi, How can I convert seconds to hh:mm:ss format? e.g. 123456s = 34:17:36 Thanks -- Andrew
1
11663
by: heirou | last post by:
I'm a novice in this subject....I've made a database that requires a time conversion. For example, if local time is 1200, determine the time in Korea. I use two fields: a date field, and a time...
3
1896
by: Chandu | last post by:
Hi, I am working on awk programming which is similar to C programming and have got a doubt about time function returning a float value. Ex: 01:01:30 should return 61.5 when i have tried my way i...
5
4662
by: Paulers | last post by:
Hello, I'm working on an app that requires the functionality to convert the time in Austrailia to the time in New York (EST). I am wondering, what is the bestway to approach this in vb.net? Is...
3
4276
by: moni | last post by:
This is all in C: I have 2 time values: System time and an input from the user. 1) System time is in the form of seconds from 1/1/1970 calculated by using time_t secs;
18
3088
by: moni | last post by:
I have 2 time values: System time and an input from the user. 1) System time is in the form of seconds from 1/1/1970 calculated by using
3
2459
by: Evan Klitzke | last post by:
Although it is not present in ANSI C, the GNU version of stftime supports the conversion character %z, which is a time offset from GMT. The four digit time offset is required in RFC 2822...
19
2267
by: DonLi2006 | last post by:
Hi, ddl & dml project varchar(10) start char(5) stop char(5) ------------------------- ----- ----- hey now 21:00 19:25 new test 20:25 20:30 t 10 ...
4
13153
by: drg | last post by:
My assignment is actually encapsulation which is not the problem -- my program needs to take two military times and calculate the minutes elapsed between the two. I have everything worked out so...
0
7203
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
7087
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
7281
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
7334
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...
0
5579
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1514
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.