Right guys i need you help please!
Im building a weather station that is meant to be updated every 1 hour. To save on time we are setiing the timer tick event to occur every 5 sec which is equal to 1 hour. Now heres the problem!
Every thing is working fine all the data is changing every 5 seconds but ive used the date time method to display the current day,month, date and the time but i want to add 1 hour to the time every time the timmer event occurs in my case every 5 secs. eg when the application beging it picks up the system time 13.45 then 5 seconds later all the data updates including the time to 14.50 and 5 seconds later 15.55 etc etc heres my code so far but in only happens on the first instance of the tick event
string curDate = System.DateTime.Today.ToLongDateString(); string curTime = System.DateTime.Now.AddHours(1).ToLongTimeString(); string CurDay = System.DateTime.Today.DayOfWeek.ToString(); string CurMonth = System.DateTime.Now.ToString("MMMM"); labelDate.Text = curDate.ToString(); labelTime.Text = curTime.ToString(); labelDay.Text = CurDay.ToString();