Autor Beitrag
F.Art
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Mi 07.09.05 13:39 
Ich möchte Uhrzeiten berechnen nur weis ich nicht wie?

ZB: 12:45:04 (Uhrzeit) + 4:26:43 - 3:42:38 =
Alpha_Wolf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 297

Ubuntu, Win XP, Win Vista
C#, Delphi 6 Prof, Delphi 2007 Prof, Java
BeitragVerfasst: Mi 07.09.05 14:02 
Einfach mal die Suche benutzen..

Aber hier vielleicht hilft dir das weiter:

www.delphi-forum.de/...t=tdatetime+addieren
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Mi 07.09.05 14:34 
Leider hilft mir das nicht weiter.
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 07.09.05 14:36 
Was hast Du bisher versucht? Wie sieht Dein Quellcode aus, der nicht funktioniert?

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Mi 07.09.05 14:47 
Ich habe bis jetzt nur die Uhrzeit ausgelesen, ich weis nicht wie ich die Uhrzeiten berechnen soll.
Hat nicht jemadand eine funktion oder so wo die Uhrzeiten direkt berechnet werden kann.


Zuletzt bearbeitet von F.Art am Mi 07.09.05 14:50, insgesamt 1-mal bearbeitet
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 07.09.05 14:48 
Wenn Du den oben verlinkten Thread gelesen hast, sollte dabei zumindest ein wenig Quellcode herausgekommen sein. Oder wenigstens mal ein paar Fragen dazu. Habe den Eindruck, Du willst andere Dein Problem lösen lassen.

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Mi 07.09.05 14:51 
Du brauchst eigentlich nur die Zeit in ms oder sek. auslesen, dann die 2. uhrzeit im gleichem format dazu addieren und dann wieder in eine "normale" Uhrzeit umwandelst.
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Mi 07.09.05 14:52 
Ich habe einfach noch keine Idee wie ich das Berechnen soll.
Ich wollte nicht erst alles in sekunden um rechnen lassen.
Ich suche eine Möglichkeit direkt mit eingabe der ':' es ausrechnen zu können.
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Mi 07.09.05 14:54 
@ Heiko
Erkläre den Programmierschritt bitte etwas genauer.
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Mi 07.09.05 14:56 
Versuch es erstmal selber und poste uns dann deinen Quelltext, denn dann sehen wir deinen guten Willen und helfen dir vlt. mit weiteren Quelltext weiter ;) .
Killmag10
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 297

Suse Linux / DOS / Windows All In One ;)
D4 / D2005
BeitragVerfasst: Mi 07.09.05 15:01 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
function Time : TDateTime

function DateToStr
function TimeToStr
function StrToDateTime
function StrToTime
function StrToDate


einfach ma in der Delphi Hilfe nach den sachen kucken :wink:

_________________
Mega-inkompetente Computer-ruinierende Organisation spioniert ohne funktionierende Technik
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Mi 07.09.05 15:12 
dieser text ist erledigt


Zuletzt bearbeitet von F.Art am Mi 07.09.05 20:17, insgesamt 1-mal bearbeitet
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Mi 07.09.05 16:37 
Warum kannst du den nicht wirklich benutzten? Und gehe auch mal Killmag10 Hinweisen nach.
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Mi 07.09.05 18:18 
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
procedure TTiming.TimerTimingTimer(Sender: TObject);
var
   S : integer;
   M : integer;
   H : integer;
begin
UhrH.Text:=FormatDateTime('hh', time);
UhrM.Text:=FormatDateTime('nn', time);
UhrS.Text:=FormatDateTime('ss', time);

if (CounterH.Value=0) and (CounterM.Value=0) and (CounterS.Value=0) then else begin
   if CounterS.Value > 0 then CounterS.Value:=CounterS.Value - 1 else begin
      CounterS.Value:=59;
      if CounterM.Value > 0 then CounterM.Value:=CounterM.Value - 1 else begin
         CounterM.Value:=59;
         if CounterH.Value > 0 then CounterH.Value:=CounterH.Value - 1;
         end;
      end;
   end;

S := StrToInt(UhrS.Text) + CounterS.Value - FlotteS.Value ;
M := StrToInt(UhrM.Text) + CounterM.Value - FlotteM.Value ;
H := StrToInt(UhrH.Text) + CounterH.Value - FlotteH.Value ;

if S < 0 then begin
   M := M - 1;
   S := S + 59;
   end;
if S > 59 then begin
   M := M + 1;
   S := S - 59;
   end;
if M < 0 then begin
   H := H - 1;
   M := M + 59;
   end;
if M > 59 then begin
   H := H + 1;
   M := M - 59;
   end;
if H > 23 then begin
   H := H - 24;
   end;

if (H<10) then StartH.Text:='0'+IntToStr(H) else StartH.Text:=IntToStr(H);
if (M<10) then StartM.Text:='0'+IntToStr(M) else StartM.Text:=IntToStr(M);
if (S<10) then StartS.Text:='0'+IntToStr(S) else StartS.Text:=IntToStr(S);

end;