开发者

DateTime 25 years back from today

开发者 https://www.devze.com 2023-04-03 04:17 出处:网络
in C# ho开发者_如何学运维w do you calculate date 25 years ago from today?How about using AddYears:

in C# ho开发者_如何学运维w do you calculate date 25 years ago from today?


How about using AddYears:

DateTime then = DateTime.Today.AddYears(-25);


This should do the trick

DateTime.Now.AddYears(-25)
0

精彩评论

暂无评论...
验证码 换一张
取 消