DateFormat problem

2 posts, 0 answers
  1. Manikandan Balasubramaniyan
    Manikandan Balasubramaniyan avatar
    17 posts
    Member since:
    Feb 2010

    Posted 20 Sep 2010 Link to this post

    Hi,
    I am using  telerik:RadDatePicker to open up a calander for the user and accept the date.

    <telerik:RadDatePicker ID="RadDatePicker_from_date" runat="server" DateInput-ReadOnly=true AutoPostBack="false">
             <DateInput DateFormat="dd/mm/yyyy"></DateInput>
    </telerik:RadDatePicker>   

    Am trying to get the date in   09/11/2010 format  ( mm/dd/yyyy) , but it always come up with time like  '09/11/2010  11:00 AM'

    Am trying to fix this, but couldnot find solution. Please help.

    Thanks,
    Mani
  2. Manikandan Balasubramaniyan
    Manikandan Balasubramaniyan avatar
    17 posts
    Member since:
    Feb 2010

    Posted 20 Sep 2010 Link to this post

    I figured out myself. I used the following and it worked.

    Format Code Block

            DateTime dt_from_date   = (DateTime)RadDatePicker_from_date.SelectedDate;      
            string from_date        = String.Format("{0:MM/dd/yyyy}", dt_from_date);

    Format Code Block

    Thanks,
    Mani
Back to Top