To find the previous date in SQL Server below query is used SELECT * FROM myTable WHERE C rDate < DATEADD ( d , - 1 , GetDate ()) The DATEADD ( d , - 1 , GetDate ()) function will subtract one from the current date and return the results In C#.Net we can do it using the below line of code DateTime .Now.AddDays(-1)
Asp.Net,C#.Net,SQL Server Articles, Source Codes and Examples