DateTime format

2 posts, 1 answers
  1. chandan singh
    chandan singh avatar
    10 posts
    Member since:
    Aug 2009

    Posted 13 Oct 2009 Link to this post

      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
  2. Answer
    Kaloyan avatar
    920 posts

    Posted 14 Oct 2009 Link to this post

    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,
    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.
Back to Top