程序中提取时间、月份的函数是什么 同上 解决方案 » 免费领取超大流量手机卡,每月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; 用formatdatetime:example:{Get year} showmessage(formatdatetime('yyyy',date));{Get day} showmessage(formatdatetime('dd',date)); GetLocalTime,能精确到千分之一秒 请关注http://expert.csdn.net/Expert/topic/1380/1380380.xml?temp=.1580774中我的回复,对我的时间函数提提意见,我很菜的 sql server数据库异常处理时的奇怪现象!急,高分求解 其实是这样,见代码 急到非常!关于MDI子窗体下调用DLL的问题,来者有分 delphi的打包问题 心情不爽来放点血(2) 监控程序? DBF能共享操作吗? 计算个人所得税算法 怎样得到IP(因特网) 求助Dephi输出显示方式! 关于table和query的组合使用 如何根据字符串来获取变量值??
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;
showmessage(formatdatetime('dd',date));