MonthOfTheYear:取得一个TDateTime变量的月份在年度中的索引


本文整理自网络,侵删。

 声明: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 listview基本用法大全

Delphi xe6 使用intent启动活动并在android应用程序中获取返回值的示例

Delphi asc转换成unicode

Delphi 中有 iif() 函数

Delphi2009之timage

Delphi图像细化处理

Delphi sqlite incomplete input 错误

Delphi 判断字符串是否为纯数字组合

Delphi 遍历所有目录和子目录下的文件名(可按后缀名遍历)

Delphi 内进行音量控制及静音

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...