I want to set a DateTime property to previous day at 00:00:00. I don\'t know why DateTime.AddDays(-1) isn\'t working. Or why DateTime.AddTicks(-1) isn\'t working. First sho
Maybe your problem is AddDays doesn't modify the object, it returns an DateTime with the changed days. So it should be:
AddDays
DateTime Yesterday = CurrentDay.AddDays(-1);