Date Format

2 posts, 0 answers
  1. Mugil
    Mugil avatar
    21 posts
    Member since:
    Mar 2013

    Posted 14 Mar 2013 Link to this post

    HI,


        i have the date format like 2/8/2013 from this i want only 8 how can i get it.
        that means i want to get particular part from the date format.




     Thanking You,
     P.Mugil
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 14 Mar 2013 Link to this post

    Hi,

    Here is the sample code snippet I tried for extracting the month from the date selected using RadDatePicker.

    C#:
    protected void RadButton1_Click(object sender, EventArgs e)
    {
        int month = Convert.ToDateTime(RadDatePicker1.SelectedDate).Month;
        RadTextBox2.Text = month.ToString();
    }

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top