MFC//时间简单比较方法

void CMFCsaveListTofileDlg::OnBnClickedButton6()//时间简单比较方法
{
    // TODO: 在此添加控件通知处理程序代码
    CTime time = CTime::GetCurrentTime();
    CString strRptTime = time.Format("%Y%m%d%H%M%S");
    CString currentTime1str = time.Format("%Y%m%d");
    MessageBox(currentTime1str);

    CString dateStr2 = _T("20200319");
    if (currentTime1str > dateStr2)
        MessageBox(_T("currentTime1str大于dateStr2"));
    else
        MessageBox(_T("currentTime1str小于dateStr2"));
        
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
  • 2021-12-27
  • 2021-08-28
  • 2021-11-28
  • 2021-09-25
猜你喜欢
  • 2021-11-25
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案