首页 > Windows开发 > 详细

delphi 判断给定日期的天数,给定日期距离月初的天数,给定日期距离月末的天数

时间:2017-04-15 19:11:20      阅读:232      评论:0      收藏:0      [点我收藏+]

uses

dateutils;

//判断给定日期的天数

label1.caption := inttostr(DaysInAMonth(yearof(StrToDate(Trim(Edit_riqi.Text))),monthof(StrToDate(Trim(Edit_riqi.Text))) ));

//给定日期距离月初的天数

label2.caption := inttostr(dayof(StrToDate(Trim(Edit_riqi.Text)) )-1);

//给定日期距离月末的天数

label3.caption := IntToStr(StrToInt(label1.caption)-StrToInt(label2.caption));

 

    

 

delphi 判断给定日期的天数,给定日期距离月初的天数,给定日期距离月末的天数

原文:http://www.cnblogs.com/lantianhf/p/6715131.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!