本文整理自网络,侵删。
声明: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 winapi: getwindowthreadprocessid - 获取指定窗口的进程 id 或线程 id
winapi 字符及字符串函数(9): lstrcat - 合并字符串
Delphi 过卡巴2009和沙盘启发杀毒的Delphi源代码
Delphi winapi: shellexecute - 打开外部程序或文件
更多相关阅读请进入《Delphi》频道 >>