how to compare 2 dates == x day and delete the file
string ConnectionString = "server=localhost;user id=name;password;persist security info=True;database=name of database;";
using (MySqlConnection conn = new MySqlConnection(ConnectionString))
{
MySqlCommand cmd = new MySqlCommand();
conn.Open();
if (conn.State == ConnectionState.Open)
{
cmd.Connection = conn;
cmd.CommandText = "select history ,lastclrhistorydate from table;";
cmd.CommandType = CommandType.Text;
MySqlDataReader reader;
reader = cmd.ExecuteReader();
if ((reader != null))
{
DataTable dt = new DataTable();
dt.Load(reader);
if (dt.Rows.Count == 1)
{
int history = int.Parse(dt.Columns[0].ToString());
string lastclrhistory =dt.Columns[1].ToString();
DateTime currentdate = DateTime.Now;
if ((currentdate - lastclrhistory) == history)
{
//(File.delete(file)
}



