delphi DirectShow9 与ADate:= date() 冲突

linzhen6790 2015-10-23 11:22:54
time 代码
procedure TForm1.Timer1Timer(Sender: TObject);
var
ADate:TDateTime;
days: array[1..7] of string;
Year, Month, Day: Word;
begin
days[1] := '星期日';
days[2] := '星期一';
days[3] := '星期二';
days[4] := '星期三';
days[5] := '星期四';
days[6] := '星期五';
days[7] := '星期六';
ADate:= date();
DecodeDate(adate, Year, Month, Day);

statusbar1.Panels[2].text:='现在时间:'+inttostr(Year)+ '年'+ inttostr(Month) +'月'+inttostr(Day)+'日 ' +formatdatetime('hh:nn:ss',time)+' '+ days[DayOfWeek(ADate)];;
end;


这个运行正确,如果在use 里面加上DirectShow9,程序就出错


...全文
143 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
linzhen6790 2015-10-23
  • 打赏
  • 举报
回复
引用 2 楼 jankercsdn 的回复:
ADate:= System.SysUtils.Date; 还有你这个把周一当第一天的,要用DayOfTheWeek, DayOfWeek是把周日当第一天
引用 2 楼 jankercsdn 的回复:
ADate:= System.SysUtils.Date; 还有你这个把周一当第一天的,要用DayOfTheWeek, DayOfWeek是把周日当第一天
谢谢,你的回答是正确了
看那山瞧那水 2015-10-23
  • 打赏
  • 举报
回复
ADate:= System.SysUtils.Date; 还有你这个把周一当第一天的,要用DayOfTheWeek, DayOfWeek是把周日当第一天
道玄希言 2015-10-23
  • 打赏
  • 举报
回复
在 DirectShow9 里面,也有个 DATE 这玩意 DirectShow9 单元有这么一段。。。 type DATE = record da_year: Integer; // Year - 1980 da_day : Byte; // Day of the month da_mon : Byte; // Month (1 = Jan) end; {$EXTERNALSYM DATE}

16,748

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 语言基础/算法/系统设计
社区管理员
  • 语言基础/算法/系统设计社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧