Click here to Skip to main content
12,761,780 members (40,285 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#
How to create a dynamic digital clock ??
i use this kind of logic
lbltime.text =;

but it woudn't showing me time with changes in seconds & minutes

Thnx in Advance..
Posted 13-Feb-13 6:41am
Updated 13-Feb-13 8:39am
richcb 13-Feb-13 11:44am
That is not how things work here. You try your project and then if you get stuck, you post the code you have attempted and explain where you are stuck and provide error messages etc, etc. Use the "Improve question" widget to update your thread with the proper info.
joshrduncan2012 13-Feb-13 11:49am
My 5.
Sergey Alexandrovich Kryukov 13-Feb-13 11:58am
You should start with tagging application type or UI library your use. The question as is makes no sense at all.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Sergey Alexandrovich Kryukov 13-Feb-13 14:36pm
Good, but ASP.NET or pure HTML/JavaScipt clock is missing, my 4. :-)
More seriously, I suggest not to answer until OP specifies the application time or UI library, platform, all required detail.
It's a waste of time to recommend solutions for a number of cases, just in case.
Maciej Los 13-Feb-13 14:45pm
OK, i'll try to remember ;)
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

If you try this in case of windows form then it would be easier than what you think.Pick Timer control on your form.Then right click on it,you will find properties.At the event tag you will find tick event which you need to use.Then code just like as..
private void timer1_Tick(object sender, EventArgs e)
            label1.Text = DateTime.Now.ToString("hh:mm:ss tt");

And see your clock is ready to operate!One thing need to mention here,you will find interval option in the properties of timer control where you can change interval of your clock.
Happy Coding..:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 13 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100