I have .Net project for some reason i need to have date to be taken.
I have done like
var date = DateTime.Today.AddDays(-1);
which is giving me yesterday's date.
but if I run my application on Monday then I should get Friday date
please suggest me expression for this.
for example.
if today is Monday and date is 21/12/2001 it should give me 19/12/2001 i.e Fridays date
if today is Tuesday and date is21/12/2001 it should return me 20/12/2001 as normal
1 Answer