DateTime dtTarget = DateTime.Now; DateTime FirstDay = dtTarget.AddDays(-DateTime.Now.Day + 1); DateTime LastDay = dtTarget.AddMonths(1).AddDays(-dtTarget.AddMonths(1).Day);
本文共 174 字,大约阅读时间需要 1 分钟。
DateTime dtTarget = DateTime.Now; DateTime FirstDay = dtTarget.AddDays(-DateTime.Now.Day + 1); DateTime LastDay = dtTarget.AddMonths(1).AddDays(-dtTarget.AddMonths(1).Day);
转载地址:http://oejbl.baihongyu.com/