DateTime.Now returns the date and the time. If you only want to display the time to the user, you can do so by only diplaying the time component.
if you try to compare 2 DateTime values then it will also compare the date part, which you should take care of in case you are creating a new instance and sending your values to it.
Clock Time !
Collapse
X
-
DateTime.Now will return date and time both but i have to read only time and in loop it will not work fine. How I can use it in thread ???Originally posted by Shashi SadasivanIf you have the timer control in, then in the timer tick event read the system time by
DateTime.NowLeave a comment:
-
If you have the timer control in, then in the timer tick event read the system time by
DateTime.NowLeave a comment:
-
Clock Time !
Hello,
In my recent project I have to make a form in which clock time should be shown. Means my form will be active upto 40 minutes and the time should be shown on form. When user will start work with form then current time will be shown on the form and with the system clock tick the timer will decrement. At 40 minutes application will be exit. Now tell me how to read system clock time at every moment. How it will be made on thread as both form and clock should be run at the same time. The code should be in C#.NET
Thank You.Tags: None
Leave a comment: