try this:-
public void alreadyExists()
{
string tdy = DateTime.Now.Date.ToString();
string aft2dy = DateTime.Now.Date.AddDays(2).ToString();
string str="select due_date from mConfirm where due_date BETWEEN '"+tdy+"' AND '"+aft2dy+"'";
sda1 = new SqlDataAdapter(str, cn);
ds = new DataSet();
sda1.Fill(ds);
string d ="";
if(ds!=null && ds.Tables[0].Rows.Count>0)
d = Convert.ToString(ds.Tables[0].Rows[0].Cells["due_date "]);
if ((Convert.ToDateTime(d) - DateTime.Today).TotalDays <= 2)
{
LblAlreadyExists.Text = "Already Under Process";
}
}
Please don't forget to mark this as your answer if it helps you out.
Thanks