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)
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)
精彩评论