decodedate,和encodedate有什么用? rt 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 procedure TForm1.Button1Click(Sender: TObject);var Present: TDateTime; Year, Month, Day, Hour, Min, Sec, MSec: Word; begin Present:= Now; DecodeDate(Present, Year, Month, Day); Label1.Caption := 'Today is Day ' + IntToStr(Day) + ' of Month ' + IntToStr(Month) + ' of Year ' + IntToStr(Year); DecodeTime(Present, Hour, Min, Sec, MSec); Label2.Caption := 'The time is Minute ' + IntToStr(Min) + ' of Hour ' + IntToStr(Hour);end;procedure TForm1.Button1Click(Sender: TObject);var MyDate: TDateTime;begin MyDate := EncodeDate(StrToInt(Edit1.Text), StrToInt(Edit2.Text), StrToInt(Edit3.Text)); Label1.Caption := DateToStr(MyDate);end; 一个窗体调用另一个窗体的procedure? 多用户下的CreateFileMapping,OpenFileMapping不能正常调用的问题. 我该继续用delphi6还是用delphi2006 集合和枚举有什么区别,什么时候使用集合,何时使用枚举? Delphi程序调试参考手册--这本书哪里有电子书下载? 如何改变Canvas区域的大小 当程序读数据库时,怎么使光标变成漏斗状? 怎么将英文转换成中文? 究竟如何设置DBISAM打开数据库的方式为只读? 字符串的疑问 关于窗口的基础问题,价值30分。 菜单问题!
Present: TDateTime;
Year, Month, Day, Hour, Min, Sec, MSec: Word;
begin
Present:= Now;
DecodeDate(Present, Year, Month, Day);
Label1.Caption := 'Today is Day ' + IntToStr(Day) + ' of Month '
+ IntToStr(Month) + ' of Year ' + IntToStr(Year);
DecodeTime(Present, Hour, Min, Sec, MSec);
Label2.Caption := 'The time is Minute ' + IntToStr(Min) + ' of Hour '
+ IntToStr(Hour);
end;
procedure TForm1.Button1Click(Sender: TObject);var
MyDate: TDateTime;
begin
MyDate := EncodeDate(StrToInt(Edit1.Text), StrToInt(Edit2.Text), StrToInt(Edit3.Text));
Label1.Caption := DateToStr(MyDate);
end;