edit1.text=""
edit1.Text= weekdayname(weekday(date()))
什么它说有下列错误:[Error] Unit1.pas(29): ':=' expected but '=' found
[Error] Unit1.pas(30): Undeclared identifier: 'weekday'
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
edit1.Text= weekdayname(weekday(date()))
什么它说有下列错误:[Error] Unit1.pas(29): ':=' expected but '=' found
[Error] Unit1.pas(30): Undeclared identifier: 'weekday'
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
edit1.Text:= weekdayname(weekday(date()))
第二个错误,没有定义Weekday函数
edit1.text:='';
edit1.Text:= weekdayname(weekday(date()))
edit1.Text:= inttostr(dayofweek(date)-1);
第二個錯誤:在Delphi中,賦值應為 := 而非 =
第三個錯誤: weekday 沒有定義
edit1.Text:= inttostr(dayofweek(date)-1);
有问题请发信息到我的E-mail:[email protected]
use IdDateTimeStamp
var p:TIdDateTimeStamp;begin
p:=TIdDateTimeStamp.Create(self);
p.AddTDateTime(date);
edit5.Text:=p.GetDayOfWeekName;
end;或在是
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' days[dayofweek(date)]
p.SetDay(dayoftheweek(date));
edit5.Text:= p.DayOfWeekName ;
case dayofweek(date) of
2:statusbar1.panels[2].text:='星期一';
3:statusbar1.Panels[2].Text:='星期二';
4:statusbar1.Panels[2].Text:='星期三';
5:statusbar1.Panels[2].Text:='星期四';
6:statusbar1.Panels[2].Text:='星期五';
7:statusbar1.Panels[2].Text:='星期六';
1:statusbar1.Panels[2].Text:='星期天';
end;
首先你是基本语法错误 ;然后里面的函数错误,至于改正方法楼上的都已经解答出来了,我想:
就不 用我在来说了吧