I am using System.DateTime.Now.ToShortDateString() to get today's date. I want to return this date minus 7 days(a week ago) so I can use it as a parameter in a SQL query. I know that System.DateTime.Now has a Subtract method, but I dont think it will suit my purposes. thanks in advance
I got this working DateTime today = DateTime.Today; DateTime back = today.Subtract(TimeSpan.FromDays(7));