本文整理自网络,侵删。
声明:function MonthOfTheYear ( const Date : TDateTime ) : Word;
描述:MonthOfTheYear函数返回月份在年中的索引值。
这个值的范围在1到12(一月到12月)之间。
var
myDate : TDateTime;
begin
myDate := EncodeDate(2002, 10, 29);
ShowMessage('The month of the year = '+
IntToStr(MonthOfTheYear(myDate)));
end;
程序运行结果:
The month of the year = 10
相关阅读 >>
Delphi 隐藏进程的单元 unit hideprocess.pas
Delphi deletedirectory 删除目录下所有文件包括子文件夹下所有文件
更多相关阅读请进入《Delphi》频道 >>