
You can see, this counts down from Todays date. I found some code online: Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick Dim startdate As DateTime = DateTime.Parse(Date.Now) Dim enddate As Date = Date.Parse(DateTimePicker1.Text) Dim ts As TimeSpan = enddate.Subtract(startdate) Label1.Text = CStr(ts.Days) & " Days, " & CStr(ts.Hours) & " Hours, " & CStr(ts.Minutes) & " minutes, " & CStr(ts.Seconds) & " sec" End Sub I plan to add items to the listview as i go along - this will ofcourse save to the textfile. On Form load - Listview loads in text file data in format of:ĭate stamp comes from a DateDateTimePicker1 which then is saved to textfile. I'm trying to build an small app that will tell me when my groceries are about to expire.
