BMS-HOSxP Community
HOSxP => Delphi / Pascal => ข้อความที่เริ่มโดย: dusit ที่ ธันวาคม 09, 2009, 10:55:27 AM
-
dayspermonth(strtoint(formatdatetime('yyyy', da)),
ไม่ทราบว่า uses ตัวไหน มี function อยู่ครับ
ขอบคุณครับ
-
ลองดูครับ
function DaysPerMonth(AYear, AMonth: Integer): Integer;
const
DaysInMonth: array[1..12] of Integer =
(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
begin
Result := DaysInMonth[AMonth];
if (AMonth = 2) and IsLeapYear(AYear) then Inc(Result); { leap-year Feb is special }
end;
-
jvjclutils
-
ขอบคุณ อ. ทั้ง 2 ท่านครับ
ใช้ได้แล้ว
-
jvjclutils
หาได้จากไหนครับ
ขอบคุณครับ