现在的位置: 首页 > 综合 > 正文

vc6.0读取系统时间并与自己通过其他方式获取的时间比较

2011年02月13日 ⁄ 综合 ⁄ 共 242字 ⁄ 字号 评论关闭
    CTime time=CTime::GetCurrentTime();
    CString m_strTime=time.Format("%Y-%m-%d %H:%M:%S");
    CString m_strDefine=("3007-11-25 10:16:00");
    if(m_strTime>=m_strDefine)
    {
        AfxMessageBox("你落后了");
    }
    else
    {
        AfxMessageBox("你超前了");
    }

抱歉!评论已关闭.