We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to set custom time in the DigitalClock and AnalogClock?

Platform: WinForms |
Control: Clock

In the Clock, you can set custom time depending upon the needs, by enabling the ShowCustomTimeClock property. Additionally, the custom time should be specified to be shown in the Analog and Digital clocks by using the CustomTime property of the Clock.


The following code example demonstrates the same.


// Shows the custom time.
this.clock1.ShowCustomTimeClock = true;
// Sets the custom time for the clock.
this.clock1.CustomTime = new DateTime(2015, 7, 21, 05, 00, 00);



'Shows the custom time.
Me.clock1.ShowCustomTimeClock = True
'Sets the custom time for the clock.
Me.clock1.CustomTime = New DateTime(2015, 7, 21, 05, 00, 00)

Analog and Digital clock with custom time

Figure 1: Analog clock and Digital clock with custom time

Sample Links:

C#: Clock_CustomTime_C#

VB: Clock_CustomTime_VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile