Autor Beitrag
ByStones
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 92
Erhaltene Danke: 1

Windows XP
Delphi 2005
BeitragVerfasst: Sa 12.11.05 11:39 
Hi,

wie kann ich in zwei verschiedene Variablen (Integer) die aktuellen minuten und stunden anzahl einlesen ???

ByStones
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 12.11.05 11:45 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
Uses DateUtils;
//[...]
h := HourOf(Now);
m := MinuteOf(Now)

_________________
We are, we were and will not be.
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Sa 12.11.05 11:55 
EncodeTime DecodeTime + F1

oder siehe hier

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 12.11.05 12:00 
Geht so (ungetestet):

ausblenden Delphi-Quelltext
1:
2:
Std := Trunc(24 * Now) mod 24;
Minuten := Trunc(1400 * Now) mod 60;

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Sa 12.11.05 12:04 
Für was Trunc()? Beim Multiplizieren gibt's doch keine Nachkommastellen.
Es sei denn, dass Now schon Nachkommastellen hat von denen ich nix weiß user defined image

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 12.11.05 12:45 
Jup. Now liefert Nachkommastellen ... Man kann das gleiche auch mit der Funktion Time machen (die intern aber auch nur Now aufruft)...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.