Hello. I have been playing around with a DateTime.Now, then subtracting a Timespan back three days. Works fine. When I try to mix this in with a ToString format for yyyyMMdd, it breaks. I can get any of the two working but never the third. Example:
What am I doing wrong?
Code:
DateTime today = DateTime.Now;
TimeSpan ts = new TimeSpan(3, 0, 0, 0);
today.Subtract(ts);
today.ToString("yyyyMMdd");
Console.WriteLine(today);