For the first:
string s = DateTime.Now.ToString("yyyy.MM.dd");
In the second case, you need to be explicit about what Date(-1) should return, but I expect it to include var foo = someDate.Add(timespan); or var foo = someDate.Add{SomeInterval}(delta);
source share