String date1 = txtdate1.Value;
            String date2 = txtdate2.Value;
            if (DateTime.Parse(date1.Replace("-", "/")) > DateTime.Parse(date2.Replace("-", "/")))
            {
                String temp = date1;
                date1 = date2;
                date2 = temp;
            }

今天遇到比较2个时间字符串,虽简单,但还是记下来

相关文章:

  • 2021-12-27
  • 2021-06-18
  • 2022-02-14
  • 2021-12-28
  • 2022-12-23
猜你喜欢
  • 2021-06-22
  • 2021-09-20
  • 2022-12-23
  • 2021-05-18
  • 2021-05-29
相关资源
相似解决方案