public List<DateTime> fechas3()
{
List<DateTime> list = new List<DateTime>();
List<DateTime> fec = new List<DateTime>();
SqlConnection cone = new SqlConnection(connect);
cone.Open();
SqlCommand cmd = new SqlCommand("SELECT DispositionDueDate FROM fechas", cone);
SqlDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
fec.Add(Convert.ToDateTime(reader[0]));
}
return fec;
}
The previous code prints me dates but I would like to subtract three days from each of those dates and show them on the screen with those three days less. Ex:
antes despues
20/5/16 ======>> 17/5/16
15/12/16 ======>> 12/12/16