1 DateTime dtFirstDay = new DateTime(DateTime.Now.Year, 1, 1);
2 DateTime dtLastDay = dtFirstDay.AddYears(1).AddDays(-1);
3 // Another way to get the last day of this year.
4 DateTime dtLastDay = new DateTime(DateTime.Now.Years, 12, 31);

 

相关文章:

  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
  • 2022-01-01
猜你喜欢
  • 2022-12-23
  • 2019-10-18
  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
相关资源
相似解决方案