2
Reply

how to display date in format?

Dipa Ahuja

Dipa Ahuja

Feb 20 2010 7:04 AM
2.5k
hi.. 

i have added 1 date field in web.confing profile area

now in home page i want to display in the format of fullmonth date, full year ex. february 20, 2010

so how to do that..?

i wrote like

ProfileCommon p;

 protected void Page_Load(object sender, EventArgs e)
    {
        p = this.Profile;
lblbay.Text = p.BirthDate.ToShortDateString();
 
}

i tried to ToLongDateString()  bt i getting date including the day :"Tuesday, January 01, 1980"

i want only "January 01, 1980"

any idea..?

thank your!!



Answers (2)