Autor Beitrag
neo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: So 13.04.03 22:29 
Hallo!

Kann mir wer sagen wie ich ermitteln kann wieviele Tage der aktuelle Monat hat?

Danke!
Michael Stenzel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 133


D3 Prof, D7 PE
BeitragVerfasst: Mo 14.04.03 01:48 
Hi.

Mit dieser Function sollt es Klappen


ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
function MonatsTage: Word;

Const Tage : array[1..12] of Word = (31,28,31,30,31,30,
                            31,31,30,31,30,31);
Var Year, Month, Day : Word;

begin
     DecodeDate(Date,Year, Month, Day);
     Result := Tage[Month];
     if (IsLeapYear(Year) AND (Monat = 2)) then
        Result := 29;
end;


Viel Erfolg
Michael.
MKehrer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114

NT, 2000
D6
BeitragVerfasst: Mo 14.04.03 08:53 
Hi neo,

Online-Hilfe

ausblenden Quelltext
1:
DaysInAMonth(const AYear, AMonth: Word): Word;					

_________________
Manfred
Was Du siehst ist in Dir (Smile)
Michael Stenzel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 133


D3 Prof, D7 PE
BeitragVerfasst: Di 15.04.03 00:13 
Hi Manfred.

Bei meiner Delphi-Version 3.0 gibt es die Funktion nicht
ausblenden Quelltext
1:
DaysInAMonth					


Michael.