473,386 Members | 1,752 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.

Addition von Zeiten

Hallo,
ich habe das Problem, dass es mir nicht gelingt, berechnete Zeiten
einer 24-Stunden Periode zu addieren. So kann ich z.B. einen täglichen
Abwesenheitszeitraum nicht zu einem Monatswert addieren. Ich habe es
schon mit DatTeil usw. versucht, wahrscheinlich mache ich etwas
falsch. Ich wäre sehr dankbar, wenn mir jemand einen Hinweis, Tipp
oder gar einen Lösungsweg zeigen könnte.
Freundliche Grüße
Wolfgang
Nov 13 '05 #1
1 2621
st*********@t-online.de (Wolfgang) wrote in message news:<b0**************************@posting.google. com>...
Hallo,
ich habe das Problem, dass es mir nicht gelingt, berechnete Zeiten
einer 24-Stunden Periode zu addieren. So kann ich z.B. einen täglichen
Abwesenheitszeitraum nicht zu einem Monatswert addieren. Ich habe es
schon mit DatTeil usw. versucht, wahrscheinlich mache ich etwas
falsch. Ich wäre sehr dankbar, wenn mir jemand einen Hinweis, Tipp
oder gar einen Lösungsweg zeigen könnte.
Freundliche Grüße
Wolfgang


<John Knapp> wrote (email):

Here is the approximate translation.

"I have the problem that I am not successful in adding up added times
within a 24 hour period. I cannot add up a daily absent time period to
a monthly value. I already tried DatTeil etc., I probably did
something wrong. I would appreciate if someone could give me a hint or
even a solution to my problem.
Kind regards

Wolfgang"

I hope this means something to you.
Using information posted by Robin Stoddart-Stones,
http://groups.google.com/groups?hl=e...net.com&rnum=3

tblAbsent:
EmployeeID Long
WorkDate Date
StartAbsence Text
EndAbsence Text

EmployeeID, WorkDate, StartAbsence, EndAbsence
1 08-Jul-04 12:00 13:00
1 08-Jul-04 17:00 20:00
1 09-Jul-04 12:00 1:00
1 09-Jul-04 16:30 20:30
2 08-Jul-04 14:00 15:00

SELECT Int(Sum(CDate([EndAbsence])-CDate([StartAbsence]))) AS Days,
Format(CDate(Sum(CDate([EndAbsence])-CDate([StartAbsence]))),'h:nn')
AS Hours FROM tblAbsent WHERE (((tblAbsent.WorkDate)=#7/8/2004#))
GROUP BY tblAbsent.EmployeeID HAVING (((tblAbsent.EmployeeID)=1));

==>

Days Hours
0 4:00

SELECT Int(Sum(CDate([EndAbsence])-CDate([StartAbsence]))) AS Days,
Format(CDate(Sum(CDate([EndAbsence])-CDate([StartAbsence]))),'h:nn')
AS Hours FROM tblAbsent WHERE (((tblAbsent.WorkDate)>=#7/8/2004# And
(tblAbsent.WorkDate)<=#7/9/2004#)) GROUP BY tblAbsent.EmployeeID
HAVING (((tblAbsent.EmployeeID)=1));

==>

Days Hours
0 9:00

The queries were untested for anything much beyond the sample shown.

James A. Fortune
Nov 13 '05 #2

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

Similar topics

3
by: Mark Dickinson | last post by:
Can anyone either reproduce or explain the following apparently inconsistent behaviours of __add__ and __mul__? The class Gaussian provides a sub-bare-bones implementation of Gaussian integers (a...
7
by: jeffbernstein | last post by:
Greetings. I'm reading "How to think like a computer scientist: Learning with Python" and there's a question regarding string operations. The question is, "Can you think of a property that...
24
by: Alex Vinokur | last post by:
Consider the following statement: n+i, where i = 1 or 0. Is there more fast method for computing n+i than direct computing that sum? -- Alex Vinokur email: alex DOT vinokur AT gmail DOT...
34
by: Andy | last post by:
Hi, Are 1 through 4 defined behaviors in C? unsigned short i; unsigned long li; /* 32-bit wide */ 1. i = 65535 + 3; 2. i = 1 - 3; 3. li = (unsigned long)0xFFFFFFFF + 3; 4. li = 1...
3
by: snow.carriers | last post by:
Let me first state that I'm using Borland Turbo C++, it's relatively old so the new string methods won't work. Anyways, first I'm trying to collect a line of a string (with numbers, letters,...
5
by: Mike | last post by:
Hello All, Please, if anyone can point me to the problem, I'd sure appreciate it! I am very new to VB programming and not a programmer to begin with. This is part of a Visual Basic 2005 Express...
5
by: Paul | last post by:
Why is the addition here adding the number as a string but the subtraction works fine? function boxchange(box) { iv= dbform.ut.value if (box.checked == true) { iv = iv - box.value } else {...
3
by: srinivas33034 | last post by:
Hi there, my problem is i have to perform addition dyamically My req is i have 3 txt boxes.. and another text box to display total additon.. as i am entering the values in TextBox1 i want...
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
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: 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
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.