This is a migrated thread and some comments may be shown as answers.
DateFormat problem
1 Answer 38 Views
This is a migrated thread and some comments may be shown as answers.
Manikandan Balasubramaniyan
Top achievements
Rank 1
Manikandan Balasubramaniyan asked on 20 Sep 2010, 04:52 PM
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

1 Answer, 1 is accepted

Sort by
0
Manikandan Balasubramaniyan
Top achievements
Rank 1
answered on 20 Sep 2010, 06:29 PM
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
Asked by
Manikandan Balasubramaniyan
Top achievements
Rank 1
Answers by
Manikandan Balasubramaniyan
Top achievements
Rank 1
Share this question
or