symbian 比较两个时间的大小

来源:互联网 发布:用友erpu8软件功能模块 编辑:程序博客网 时间:2024/06/07 17:11
TBool CompareDateTime(TInt ayear,TInt amonth,TInt aday)
{

TTime CurrtTime;
CurrtTime.HomeTime(); //当前时间

TDateTime aDateTime;
aDateTime.Set ( ayear, TMonth(amonth), aday, 0, 0, 0, 0);
//用参数构建一个时间

TTime BarTime(aDateTime);
TTimeIntervalDays dayval =7;
BarTime +=(dayval);
//给构建的时间加7天.

if (CurrtTime >BarTime)
{
return ETrue;
}
return EFalse;
}
原创粉丝点击