to wuchi:
幫助文章有說明的, 你可以把這段代碼放進你需要的程序裏整理一下就可以用了.
procedure TForm1.Button1Click(Sender: TObject);
var
ADate: TDateTime;
days: array[1..7] of string;
begin
days[1] := 'Sunday';
days[2] := 'Monday';
days[3] := 'Tuesday';
days[4] := 'Wednesday';
days[5] := 'Thursday';
days[6] := 'Friday';
days[7] := 'Saturday';
ADate := StrToDate(Edit1.Text);
ShowMessage(Edit1.Text + ' is a ' + days[DayOfWeek(ADate)];
end;