首 页 | 新 闻 | Symbian | Android| Windows Mobile | J2ME | 下载中心 | 游戏策划招聘与求职 | 购书指南 | 视频教程
您现在的位置: 开发视界 >> Symbian >> Symbian入门 >> 文章正文
symbian 比较两个时间的大小
作者:佚名    文章来源:转载    更新时间:2008-5-28 17:33:01
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;
}
相关文章:
没有相关文章