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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DateTimePickerAdv ShortDate + Time format

Thread ID:





60454 May 4,2007 09:43 PM UTC May 7,2007 06:30 PM UTC Windows Forms 2
Tags: Tools
Julie Levy
Asked On May 4, 2007 09:43 PM UTC

Hi -
I need to display a format which is the shortdate + time and it needs to pick up the local culture of the machine ( i don't want to set a custom format where i determine the month/day/year order, etc.).

How do i do this with the DateTimePickerAdv.

I am using version and .NET 2.0

Murugan [Syncfusion]
Replied On May 5, 2007 01:05 AM UTC

Hi Julie,

The local culture of the machine could be assigned by using UseCurrentCulture property of the DateTimePickerAdv class. The UseCurrentCulture property sets the system DateTime culture to the DateTimePickerAdv control.

this.dateTimePickerAdv1.UseCurrentCulture = true;
this.dateTimePickerAdv1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePickerAdv1.CustomFormat = this.dateTimePickerAdv1.Culture.DateTimeFormat.ShortDatePattern.ToString () + " " + this.dateTimePickerAdv1.Culture.DateTimeFormat.ShortTimePattern.ToString();


Please try this and let me know if this helps.

Thank you for your interest in Syncfusion products.

Murugan P.S

Julie Levy
Replied On May 7, 2007 06:30 PM UTC



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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