📅  最后修改于: 2022-03-11 14:49:16.307000             🧑  作者: Mango
// Just add the days you want to subtract as negatives
DateTime dateForButton = DateTime.Now.AddDays(-1);
// eg. DateTime.Now = 22.11.2021; DateTime.Now.AddDays(-1) = 21.11.2021