本文整理自网络,侵删。
声明: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 getprocessmemoryinfo获取进程占用内存大小
Delphi 如何在stringgrid中嵌入控件,如按钮等等
更多相关阅读请进入《Delphi》频道 >>