您的位置:首页 > 其它

获取当月第一天和最后一天

2010-09-23 17:55 274 查看
int year=DateTime .Now .Year ;
int month=DateTime .Now .Month ;
this.dtiFromTime.Value =new DateTime(year, month, 1); //显示当月第一天
this.dtiToTime.Value = new DateTime(year, month, DateTime.DaysInMonth(year, month)); //显示当月最后一天
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐