开发者

DateTime 25 years back from today

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜