how can i delete folders and its content based on date of creation?eg.created 3 months back
<p>I want to delete folders and its content  created 3 months back...........
i have written a code.....but not working when condition is given</p>

<pre><code>protected void Button1_Click(object sender, EventArgs e)
    {
        string NewDirectory = "C:\\New Foouterlder\\delete";


        DeleteDirectoryIfExist(NewDirectory);


    }
    private void DeleteDirectoryIfExist(string NewDirectory)
    {
        DirectoryInfo di = new DirectoryInfo("C:\\New Foouterlder\\delete");

        try
        {
            if (System.IO.Directory.Exists(NewDirectory))
                {
                    if (di.CreationTime&lt; DateTime.Now.AddMonths(-3))
                    {

                        Response.Write(MydateTime);
                        Directory.Delete(NewDirectory, true);
                   }
           else

                    {
                       Label1.Text = "Directory Not Exist";

                   }
            }
            Response.Write(di.CreationTime);



        }
        catch (IOException _err)
        {
            Response.Write(_err.Message);
        }
    }
}
}
</code></pre>

<p>di.CreationTime as 1/1/1601 5:30:00 AM ....why</p>
