Autor Beitrag
BennyM
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Mi 15.10.03 12:22 
Ich möchte gerne das aktuelle datum in 3 variablen speichern. eine variable in der der aktuelle tag also z.B. '05' in einer variablen der aktuelle monat also '09' und in einer variable das aktuelle jahr vierstellig also '2003' steht. wie mache ich das am geschicktesten ? gibt es keine procedure getdayofyear oder so was ?

Moderiert von user profile iconTino: Titel geändert & Topic verschoben.
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Mi 15.10.03 12:41 
Hallo,

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
type
  TMyDatum=record
    Tag,
    Monat,
    Jahr    :Word;
  end; // TMyDatum

....
....
var
  MyDatum:TMyDatum;
...
// aktuelles Datum
with MyDatum do
  DecodeDate(Date, Jahr, Monat, Tag);
...

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mi 15.10.03 12:42 
Schau dir mal die Funktion DecodeDate in der Delphi-Hilfe an. Dort befindet sich auch ein Beispiel!

Gruß
Tino
BennyM Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45



BeitragVerfasst: Mi 15.10.03 13:12 
jo hab ich gefunden vielen dank ...