DateTime dt = DateTime.Today;  //先获取当前日期,再减去一天。
string preDay = dt.AddDays(-1).ToString("yyyy-MM-dd");