Using system; using system. collections. generic; using system. componentmodel; using system. data; using system. drawing; using system. text; using system. windows. forms; namespace Date {public partial class form1: FORM {public form1 () {initializecomponent (); string ST1 = "2008-11-4"; // the end date datetime dt2 = system. datetime. now; // obtain today's date datetime dt1 = convert. todatetime (ST1); // convert the end date type to datetime string dateterm = NULL; // try {timespan ts1 = new timespan (dt1.ticks ); // convert a date to a comparable timespan ts2 = new timespan (dt2.ticks); timespan Ts = ts1.subtract (ts2 ). duration (); // end date minus current date // dateterm = ts. days. tostring () + "day" // + ts. hours. tostring () + "Hour" // + ts. minutes. tostring () + "Minute" // + ts. seconds. tostring () + "second"; dateterm = "end of project" + ts. days. tostring () + "day"; // remaining time of the Project // MessageBox. show (dateterm); label1.text = dateterm; // display in label} catch {}}}}
Drag the generated .exe file to the startup Item to remind you to pull it every day.