C++日期比较大小

date dtStartDate = from_undelimited_string("20130116");
date dtEndDate = from_undelimited_string("20130115");
if (dtStartDate == dtEndDate)
{
cout << "等于" << endl;
}
else if (dtStartDate < dtEndDate)
{
cout << "小于" << endl;
}
else
{
cout << "大于" << endl;
}

posted @ 2013-06-26 18:40  Predator  阅读(1499)  评论(0编辑  收藏  举报