Date issue


#1

How to get yesterday’s date??


#2

Hello there,

var yesterday = DateTime.Today.AddDays(-1);

or
DateTime.Now.AddDays(-1)

or
string result = DateTime.Today.AddDays(-1).ToString(“yyyy-MM-dd”);


#3

Thanks