dynamically continue or running date time from database value
eg: 11-Jun-14 1:09:48 PM
11-Jun-14 1:09:49 PM
11-Jun-14 1:09:50 PM like that increment ..... and display to label
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sibeesh VenuRank #27 · 42.9K reputationPosted Apr 21, 2015, 4:19 AM EDT
You mean you already have values in your DB and you need to show that in labels? Have you tried anything. If yes can you please share that. So that we can help you easily.
As far as I understood your need, following code block will do your requirement.
private void btnStartWatch_Click(object sender, EventArgs e) { timer1.Enabled = true; } private void btnPauseWatch_Click(object sender, EventArgs e) { timer1.Enabled = false; } int i = 1; DateTime dt = new DateTime(); private void timer1_Tick(object sender, EventArgs e) { label1.Text = dt.AddSeconds(i).ToString("HH:mm:ss"); i++; }Please up vote and accept if it helps you.
Kindest Regards
Sibeesh Venu
www.sibeeshpassion.com