This is a migrated thread and some comments may be shown as answers.

DateTime format

1 Answer 140 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
chandan singh
Top achievements
Rank 1
chandan singh asked on 13 Oct 2009, 12:06 PM
Hi,
  I am with struggling with date format issues.
  I want to know how to use following code for displaying date into dd/mm/yyyy format

CultureInfo cultureInfo = new CultureInfo("en-US"); 
            DateTimeFormatInfo dateInfo = new DateTimeFormatInfo(); 
            dateInfo.ShortDatePattern = "dd-MM-yyyy"
            cultureInfo.DateTimeFormat = dateInfo; 
            RadDatePicker1.Culture = cultureInfo;  


Chandan singh

1 Answer, 1 is accepted

Sort by
0
Accepted
Kaloyan
Telerik team
answered on 14 Oct 2009, 02:45 PM
Hi chandan singh,

Did you try setting this format:
CultureInfo cultureInfo = new CultureInfo("en-US");
DateTimeFormatInfo dateInfo = new DateTimeFormatInfo();
dateInfo.ShortDatePattern = "dd/MM/yyyy";
cultureInfo.DateTimeFormat = dateInfo;
RadDatePicker1.Culture = cultureInfo;


Kind regards,
Kaloyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
DatePicker
Asked by
chandan singh
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Share this question
or