//上个月第一天0点
DateTime date2 = DateTime.Now.AddMonths(-1).Date.AddDays(1 - DateTime.Now.Day);
        Response.Write(date2.ToString());
//上个月最后一天23点59分59秒
        string LastMonth_lastDay = DateTime.Parse(DateTime.Now.AddDays(1 - DateTime.Now.Day).ToShortDateString()).AddSeconds(-1).ToString();
        Response.Write("<br>" + LastMonth_lastDay);

相关文章:

  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案