471,336 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,336 software developers and data experts.

DateTime.now - 30 (days)


I want to get the current date minus 60 days, how can i do that.
This is what i have /want:

DateTime now = DateTime.Now;

Result = DateTime.Now.ToString("yyyyMMdd") + "')-60;

it must also work when the current date is in January.

Any tips are welcome.

Groetjes Rene.
Sep 16 '08 #1
2 33060
DateTime newDate = DateTime.Now.AddDays(-60);

Sep 16 '08 #2
Clint schreef:
DateTime newDate = DateTime.Now.AddDays(-60);
Great, that works !!

groetjes, Rene
Sep 16 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Robert Brewer | last post: by
4 posts views Thread by John Hunter | last post: by
2 posts views Thread by Mike | last post: by
10 posts views Thread by David P. Donahue | last post: by
4 posts views Thread by Lad | last post: by
5 posts views Thread by mroeloffs | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.